设置本地 git 账户
git config --global user.name "zhf"
git config --global user.email "hongfei.zh@outlook.com"
ssh-keygen -t rsa -C "这里换上你的邮箱"
添加/删除/查看远程库
git remote add origin xxx.git
git remote rm origin xxx.git
git remote -v
写入缓存区/放入暂存区
git add .
git commit -m "first upload"
上传/拉取代码
git push origin master
git pull
放弃修改,强制覆盖本地代码
git fetch --all
git reset --hard origin/master
git pull
设置代理
git config --global http.proxy http://127.0.0.1:7890(端口号查看代理)
git config --global https.proxy https://127.0.0.1:7890
git config --global --unset http.proxy
git config --global --unset https.proxy