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

Shawn Fox August 22, 2015

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
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2015

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

Shawn Fox September 8, 2015

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
TAGS
AUG Leaders

Atlassian Community Events