git 创建分支

海龟下
create branch test
然后
checkout test
then
git commit test

创建分支完毕

gitbash下

git branch test
git checkout test
git push origin test:test

删除
git push origin :test

本地删除
git branch -D test

git branch -a 列出所有分支

获取远程分支
git checkout -b dev-1054.2 origin/dev-1054.2

放弃本地分支的所有修改:
git checkout .
从stack中获取覆盖当前工作区


使用 git reset --hard HEAD 命令撤销这次 pull origin 操作 ,还原到最近一次修改



猜你喜欢

转载自wangqiaowqo.iteye.com/blog/1933237
今日推荐