5

When I'm on master, I only have to type 'git push' to push commits to the remote repo. I wish I could do so when I'm on another branch, without specifying the remote name and the branch name. Like that:

Now: git push origin experimental:origin/experimental

Need: git push

orion3
  • 9,797
  • 14
  • 67
  • 93

1 Answers1

12

You should edit your .git/config file. There should be already set something like this:

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

Simply copy the group and edit according to your needs. For example, you could have:

[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "experimental"]
    remote = origin
    merge = refs/heads/experimental
Damir Zekić
  • 15,630
  • 2
  • 34
  • 35