-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not respect push.default #63
Comments
I don't think the git-gui respects the It is something I've noted in my set up. (the upstream repos for many of my branches are on read only remotes, my push.remote is called
Is that verbatim? surely it should be "fork" (assuming there isn't confusion between the remotes and their names..) |
Yes, this is one of the 5 allowed options of
I would have expected git gui to just call In the console if I am on the fork-master branch and just say "git push" it will push to fork/master, because I have configured this previously with --set-upstream.
|
Ah, thanks. I was miss-remembering the setup for setting the push default to be different from the declared upstream. The 'dot' (period) is in a different place.. my local config has
I think the git gui constructs the command from the various options in the push dialog, but I haven't checked. |
Is there a workaround for this annoying issue? I frequently end up pushing a branch to the wrong remote because I miss to select the correct branch manually in the push form. A "git push" on the command line selects the correct remote, as reported by "git branch -vv".
This issue should be considered as a major-major usability bug to be fixed. |
I think the place to add the checks is C:\git-sdk-64\usr\src\git\git-gui\lib\transport.tcl#L176 (mine /GithubURL ;-) The task, get the current branch name, and then it's (push) remote, if it has one. Then get the remote.pushdefault, if present. Finally (existing code) use 'origin', or top of the list of remotes if nothing else. I haven't worked my way around to working out how the gui holds it copy of the config for extracting those values. A little bit of pseudocode for the pushDefault step, but needs work ;-)
|
I have two different remotes: origin and fork
I have two local branches: master and fork-master
I have setup tracking as such:
I have set push.default to
upstream
When I am on the fork-master branch and say "git push" without anything else
in the console it will correctly push to master on fork
If I am in git-gui and press the push button, have "fork-master" selected as
my local branch and "fork" as my remote and press "push" it will create a new
branch "fork-master" on my remote. I would have expected the same result as
in the console.
I have found a setting "match tracking branches" but it does not seem to
have a effect on anything whatsoever, no matter if I enable or disable it,
the behavior will stay exactly the same.
The text was updated successfully, but these errors were encountered: