git的简单命令

//拉去远程仓库到本地
$ git clone http://10.100.10.199:8081/frontend/cmb-investment.git

//切换到跟目录
$ cd cmb-investment/

//
$ git fetch -a

//
$ git branch

$ git branch -v

$ git checkout -b hotfix-12 origin/hotfix-12

还原某个版本
git reset --hard xxxx


$ git branch -a
查看分支

$ git branch --set-upstream-to=origin/feature-11  release-11

切换分支

git pull 
拉取代码

合并分支代码
git cherry-pick  《id》

//将东西暂存起来
git stash
git checkout 
git pull
git commit
git push
//还原暂存的东西
git stash pop
git push origin feature-cd --force

你可能感兴趣的:(git,git,github)