Skip to content
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

pull creates confusing remote branches #2241

Closed
kasal opened this issue Feb 8, 2014 · 2 comments
Closed

pull creates confusing remote branches #2241

kasal opened this issue Feb 8, 2014 · 2 comments

Comments

@kasal
Copy link

kasal commented Feb 8, 2014

To reproduce:

  1. clone a repo (e.g., file://...)
  2. create a local branch (e.g., "foo") and check it out
  3. Pull, accepting the defaults offered by the dialog

Actual result:
this creates a new remote branch corresponding to origin/HEAD,
e.g., refs/remotes/origin/foo
(You need prune them using "git remote prune origin" or using the remotes dialog.)

Expected result:

  • Error: this is not a remote tracking branch.

Explanation:
This confuses people. The worst problem is there "origin/foo" is displayed, the remote does not actually exist.

Code:
The command issued is:
"C:\Program Files (x86)\Git\bin\git.exe" pull --progress "origin" :refs/remotes/origin/foo

Fix:
I believe that if no remote branch is explicitly selected in the dialog, the second parameter should be omitted. (This is already so if the current branch is remote-tracking.)
This would lead to the error explaining that "pull" is to be used mainly with remote-tracking branches.

@pmme
Copy link
Contributor

pmme commented Feb 12, 2014

This appears to be closely related to: #2142

@kasal
Copy link
Author

kasal commented Feb 12, 2014

Indeed, this was a duplicate, thank you for the reference.
Sorry that I wasn't able to test the current master...

@kasal kasal closed this as completed Feb 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants