git 自动填充用户名和密码
git config --global credential.helper store
git 删除远程tag
$ git tag -d v0.9
Deleted tag 'v0.9' (was f52c633)
$ git push origin :refs/tags/v0.9
To github.com:michaelliao/learngit.git
- [deleted] v0.9
git 补丁操作
git diff from_id to_id > xxx.patch #生成补丁
git apply xxx.patch #git diff生成的patch,打补丁
git apply --check xxx.patch #检查补丁
分支还原、丢弃操作
分支还原
git reset HEAD --hard
git clean -xdf
git rm --cached <file>