Written by
shipujin
on
on
Git 日常使用技巧
Git 日常使用技巧,提高生产力.
Git usage tips and methods
1.更新第一次的commit(rebase -i 只能更新第2个commit)
git checkout --orphan new-master master
git commit -m "新的第一次commit内容"
2.删除tag标签
# 删除本地标签tag
git tag -d 标签名
# 删除远程标签tag
git push origin :refs/tags/标签名
3.删除branch分支
# 删除本地分支branch
git branch -d <branch>
# 删除远程分支branch
git push origin --delete <branch>
# 或
git push <remote> :<branch>