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

1 vote
Accepted answer

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):

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
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

968 views 4 2
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