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

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 Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

274 views 0 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot