git指令基础

2019-12-19  本文已影响0人  Wrestle_Mania

https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%88%86%E6%94%AF%E7%9A%84%E6%96%B0%E5%BB%BA%E4%B8%8E%E5%90%88%E5%B9%B6

git branch
git checkout master
git merge dev
git checkout -b test

上面指令是下面指令的缩写

git branch test
git checkout test
git log
git log --pretty=oneline    //显示commitId、commit文案
git log --pretty=short   // 显示commitId、提交人、commit文案
git log --stat -2
git branch -m oldName newName
git status
git log 
git show 1436b6f05fb95046b46476ea7bf0572a316a0e6f
git log --pretty=oneline      //查看提交记录的commitId
git reset --hard commitId   //重置分支到某次提交
git push origin HEAD -f     //更新远端代码
上一篇 下一篇

猜你喜欢

热点阅读