git的常用命令

git status -s   //查看当前状态
git branch -a   //查看本地的当前所在分支
git add .       //将改动add
git commit -m "注释"    //添加注释
git log --oneline      //查看提交日志版本号
git checkout 分支名     //切换本地分支
git cherry-pick 版本号  //合并该版本号下的改动  
git push origin 分支名   //推到git上

//merge合并
git status -s          //查看状态
git log --oneline      //查看日志
git pull origin 分支名  //同步sit分支代码
git merge 本地分支名   //合并分支代码
git status -s          //查看合并后的状态,手动解决冲突
git add .              //将修改add
git status -s
git commit -m "注释"    //添加注释
git push origin 分支名

 

 

你可能感兴趣的:(git的常用命令)