8000 checking out pull requests by mechmind · Pull Request #3 · tiimgreen/github-cheat-sheet · GitHub
[go: up one dir, main page]

Skip to content

checking out pull requests 8000 #3

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
3 commits merged into from
Apr 13, 2014
Merged

checking out pull requests #3

3 commits merged into from
Apr 13, 2014

Conversation

mechmind
Copy link
Contributor

You can checkout pull request locally, as shown.

@ghost
Copy link
ghost commented Apr 13, 2014

Hey @mechmind, I'll be looking into your PR.

First, I wanted to try this out and ran git fetch +refs/pull/*/head:refs/pull/* inside of the clone of this very repository. This is what I get:

➜  github-cheat-sheet git:(master) git fetch +refs/pull/*/head:refs/pull/*
zsh: no matches found: +refs/pull/*/head:refs/pull/*

The second method of fetching the Pull Requests as remote branches gives me a similar problem:

git fetch +refs/pull/*/head:refs/remotes/origin/pr/*
zsh: no matches found: +refs/pull/*/head:refs/remotes/origin/pr/*

Any idea as to why this is happening? Maybe the easiest way to add this section is look at Checking out pull requests locally and make it shorter?

@mechmind
Copy link
Contributor Author

Fixed commands, please check again.

@ghost ghost added the feature label Apr 13, 2014
@mechmind
Copy link
Contributor Author

I tested that commands in simple repo and they work. May be this is a zsh issue?

@ghost
Copy link
ghost commented Apr 13, 2014

Ahhh, I found what the issue was and also found a solution. Some people had similar issues. Adding noglob to the beginning of this command seems to work just fine. You might want to add that into your PR:

➜  github-cheat-sheet git:(master) noglob git fetch origin +refs/pull/*/head:refs/pull/*
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 2), reused 5 (delta 1)
Unpacking objects: 100% (6/6), done.
From github.com:tiimgreen/github-cheat-sheet
 * [new ref]         refs/pull/1/head -> refs/pull/1
 * [new ref]         refs/pull/2/head -> refs/pull/2
 * [new ref]         refs/pull/3/head -> refs/pull/3

@mechmind
Copy link
Contributor Author

noglob is internal zsh command. Instead, i added quotes for fetch commands, thus zsh should not treat +refs/pull/*/head:refs/pull/* as shell pattern.

ghost pushed a commit that referenced this pull request Apr 13, 2014
Checking out pull requests locally
@ghost ghost merged commit 85f9152 into tiimgreen:master Apr 13, 2014
Brynn-M-Shep referenced this pull request in Brynn-M-Shep/github-cheat-sheet Sep 5, 2024
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.

1 participant
0