美文网首页
GIt Branching

GIt Branching

作者: 薛路 | 来源:发表于2016-12-28 09:44 被阅读0次
  • create branch

    $ git branch test
    
  • switch branches

    $ git checkout test
    
  • create and switch branch

    $ git checkout -b issue
    
  • delete branch

    $ git branch -d hotfix
    
  • merge branch to master

    $ git checkout master
    $ git merge issue
    
  • show branchs

    $ git branch
    #see the last commit on each branch
    $git branch -v
    
    #filter by if the branch are already merged into current branch
    $ git branch --merged
    $ git branch --no-merged
    

相关文章

网友评论

      本文标题:GIt Branching

      本文链接:https://www.haomeiwen.com/subject/jgcjpttx.html