Git
Foreword
统一概念:
工作区:改动(增删文件和内容)
暂存区:输入命令:
git add 改动的文件名
,此次改动就放到了 ‘暂存区’本地仓库(简称:本地):输入命令:
git commit 此次修改的描述
,此次改动就放到了 ’本地仓库’,每个 commit,我叫它为一个 ‘版本’。远程仓库(简称:远程):输入命令:
git push 远程仓库
,此次改动就放到了 ‘远程仓库’(GitHub 等)commit-id:输出命令:
git log
,最上面那行commit xxxxxx
,后面的字符串就是 commit-id
Git指令
Git配置
git config --global -l
Github访问问题
全局代理(不推荐)
设置
git config --global http.proxy socks5://127.0.0.1:1080 #http://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080 #https://127.0.0.1:1080
取消
git config --global --unset http.proxy
git config --global --unset https.proxy
只对部分域名代理(推荐)
只对github进行代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808
git config --global https.https://github.com.proxy socks5://127.0.0.1:10808
设置Host
Last modified: 28 十一月 2023