Skip to content

Added how to set up git globally to to fetch pull requests #78

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

Merged
1 commit merged into from
Jul 12, 2014

Conversation

GaborApatiNagy
Copy link
Contributor

No description provided.

ghost pushed a commit that referenced this pull request Jul 12, 2014
Added how to set up git globally to to fetch pull requests
@ghost ghost merged commit 2acb308 into tiimgreen:master Jul 12, 2014
@ghost
Copy link

ghost commented Jul 12, 2014

Very cool.

@ghost ghost added the feature label Jul 12, 2014
@hail2u
Copy link
Contributor

hail2u commented Aug 5, 2014

Setting this globally raises problem adding/removing remote origin. After setting this, I get following error when initializing new repository:

$ git remote add origin https://github.com/hail2u/example.git
fatal: remote origin already exists.

This must be removed from this cheat sheet.

@pluma
Copy link

pluma commented Aug 5, 2014

@hail2u Interesting, so this was the reason for that error.

It's not really a problem, though. Just use set-url instead of add.

@hail2u
Copy link
Contributor

hail2u commented Aug 5, 2014

Using remote set-url can set remote.origin.url, but not remote.origin.fetch. This means git fetch failed to save remote branches (master) as origin/master:

$ git fetch
From https://github.com/hail2u/example
 * branch            master   -> FETCH_HEAD
$ git branch --set-upstream-to=origin/master
error: the requested upstream branch 'origin/master' does not exist

Yes, we can manually set remote.origin.fetch correctly, but I think this breaks a typical Git workflow.

@tiimgreen tiimgreen assigned ghost Aug 6, 2014
@ghost
Copy link

ghost commented Aug 6, 2014

What do you guys propose as a fix for this? Doing this thing globally is useful but if it breaks stuff then we might as well just remove it from the cheat sheet.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants