In what situation would I push local to a different remote branch?

I have a followup question to the following thread.

Why does the Push button in toolbar open a dialog with EVERY branch preselected instead of the branch i'm on?

Why is there a drop down menu for the selection of a remote branch?  In what situation would you want o have a local branch be named differently from the remote?  Is that more of a GIT issue that GIT allows that, and source tree is just implementing the behavior that GIT allows or is there some other reason for this?  I don't understand why a workflow would ever lead to that situation.  It seems to me that doing that would only lead to significant confusion.  The merge comments would use the local branch name so if you push do different remote then I don't see how that would be a useful thing to do.

1 answer

1 accepted

This widget could not be displayed.

It's just full implementation of Git functionality.

This guy has one simple real-world example (though it still seems like a dangerous practice to me): http://blog.supermatter.com/post/761870270/git-push-a-local-branch-to-a-different-remote-branch

Thanks. I learned recently that the following command changes the default behavior of the button. I thought that other readers might be interested in knowing that. git config --system push.default current

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

709 views 1 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you