Git 分支

1.查看本地和遠程分支

D:\WorkSpace0\gx-desk (master)
$ git branch -a
* master
  remotes/origin/master

2.查看本地分支

D:\WorkSpace0\gx-desk (master)
$ git branch
* master

3.建立本地分支

D:\WorkSpace0\gx-desk (master)
$ git branch br-1.0.1
$ git branch -a
  br-1.0.1
* master
  remotes/origin/master

4.切換分支

D:\WorkSpace0\gx-desk (master)
$ git checkout br-1.0.1

5.合併分支到master

D:\WorkSpace0\gx-desk (master)
$ git merge br-1.0.1 --no-ff
Merge made by the 'recursive' strategy.
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--no-ff 做用

【git 刪除本地分支】git

git branch -D brcode

【git 刪除遠程分支】圖片

git push origin :br (origin 後面有空格)rem

相關文章
相關標籤/搜索