git reset --hard gitcode
git push origin HEAD --force
git push -f origin master
git checkout [branchname] 切换分支
git pull origin nayi
git config --global user.email “951634379@qq.com”
git config --global user.name “luopu”
git config --global core.editor “vi”
[credential]
helper = store
push之后才有作用?
git config --global credential.helper store
git config receive.denyCurrentBranch ignore --global
post-update.sample改名为post-update加入如下内容
#exec git update-server-info
unset GIT_DIR
cd …
git checkout -f
git checkout -b v2.0.0_hls origin/v2.0.0_hls
git remote set-url origin root@172.16.6.36:/root/cifs/host/taaMaster
git config receive.denyCurrentBranch ignore
git clone -b v2.0.0_langfang http://gitlab.lanxum.net/engine/TAA.git
git clone -b v2.0.0_langfang http://172.16.1.236/engine/TAA.git
pull某个分支
git pull origin nari
vpn远程推送错误,但实际更新完成
$ git push origin nari
root@172.16.212.3’s password:
Esing objects: 100% (250/250), done.
Writing objects: 100% (266/266), 2.38 MiB | 81.00 KiB/s, done.
Total 266 (delta 199), reused 0 (delta 0)
remote: error: cannot lock ref ‘refs/heads/nari’: ref refs/heads/nari is at 2b6cdd6b4ae0a575d9dabfca57f555e3fabe but expected 666183e5f6a09e053ff4b922d7aa9881ddeb
git config --global http.proxy http://IP:Port
修改.gitignore时,已经跟踪了一些,需要这样处理(.gitignore看起来未生效时)
git rm -r --cached .
git add .