zoukankan      html  css  js  c++  java
  • git本地分支

    1. 新建并切换到该分支

    $ git checkout -b iss53

    Switched to a new branch 'iss53'

    相当于:

    $ git branch iss53
    $ git checkout iss53

     

    2. 切换到分支

    $ git checkout master
    Switched to branch 'master'

     

    3. 合并分支

    git merge hotfix

    合并hotfix到当前分支

    (再运行一次 git status 来确认所有冲突都已解决)

     

    4. 删除分支

    $ git branch -d iss53

     

    5. 使用合并工具 

    git mergetool

     

    6. 查看

    $ git log --pretty=format:'%h %s' --graph
    * 734713b fixed refs handling, added gc auto, updated tests
    *
    d921970 Merge commit 'phedders/rdocs'
    |
    | * 35cfb2b Some rdoc changes
    * | 1c002dd added some blame and merge stuff
    |/
    * 1c36188 ignore *.gem
    * 9b29157 add open3_detach to gemspec file list

  • 相关阅读:
    linux command ubuntu
    C++ project
    windows command line
    vi command
    C++ Language
    postgresql backup
    C Language
    L1-046. 整除光棍(模拟除法)
    pta 拯救007(Floyd)
    CCF 201609-4 交通规划
  • 原文地址:https://www.cnblogs.com/liqipeng/p/4592171.html
Copyright © 2011-2022 走看看