Git 常用命令,持续更新

  • 更新远程分支的本地列表
git remote update origin --prune
  • git取消合并
git merge --abort
  •  删除本地分支
git branch -d <BranchName>
  • 删除远程分支
git push origin --delete <BranchName>
  • 查看本地分支列表
git branch
  • 查看项目分支列表(包括本地和远程)
git branch -a
  •  移除某个文件的版本控制
git rm -r --cached file(文件或者目录)。然后提交,推送
原文地址:https://www.cnblogs.com/azhqiang/p/15527833.html