Git 一些好用的命令(写着,备用)

  • 文件查阅系列
  1. 查看某个文件的历史修改版本: git log --follow -p fileRelativePath
  • stash系列,stash 针对整个分支
  1. stash: git stash / git stash save 'msg'
  2. stash pop:  git stash pop
  3. 应用任意一次修改到当前目录 stash 内容不被pop出来 : git stash apply stash@{x}
  4. 列表:git stash list
  5. 清空:git stash clear
  • 分支系列
  1. 删除本地分支:git branch -D branchName
  2. 创建并切换分支:git checkout -b branchName
  3. 切换分支:git checkout branchName

猜你喜欢

转载自blog.csdn.net/weixin_42713970/article/details/86570119