iOS 大神之路

git 本地/远程,建立/查看/删除分支简单命令

2017-01-04  本文已影响28人  329fd8af610c

今天在用git创建分支的时候想记录一下常用的git命令,方便日后查询。

一,查看本地分支

命令:git branch

图 一

二,查看远程分支

命令:git branch -a

图 二

三,建立本地分支

命令:git branch test(新建分支名)

图 三 图 四

四,将本地分支push到远程上

命令:git push origin test(新建分支名)

图 五

五,切换到新建分支(test分支)

命令:git checkout test(新建分支名)

图 六 图 七 图 八

六,删除本地分支

命令:git branch -d test(新建分支名)

图 九 图 十

七,删除远程分支

命令:git push origin :test

图 十一
上一篇 下一篇

猜你喜欢

热点阅读