Le Bagage, Gautier Pelloux-Prayer

You are here:   Home > Welcome > Git - set merging branch

Git - set merging branch

  • Issue : if you always stay on the same branch, you should set it into your git config to stop receiving message :

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
   [branch "master"]
   remote = <nickname>
   merge = <remote-ref>

   [remote "<nickname>"]
   url = <url>
   fetch = <refspec>

  • Solution :

In shell :

Command me.rincevent:~ : git config branch.master.remote origin
Command me.rincevent:~ : git config branch.master.merge refs/heads/master

Or simply edit  .git/config and add (the most common) :

    [branch "master"]
    remote = origin
    merge = refs/heads/master