-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 request checkout with no 'leftovers' #1206
Comments
That's not a bad idea. I definitely already have a plan to change the Since I plan to refactor |
Thanks, sounds good to me. |
+1. The official github doc uses the command
which avoids the Thanks for submitting this! |
Oh, that's clever, and a good workkaround in the meanwhile. Thanks! |
Yay thanks! 🎉 |
Mind that the new implementation still leaves a branch around. But, most importantly, it doesn't create any git remotes anymore. |
That's exactly what I'd expect as a user so thanks! |
Thanks! Not having a remote is nice, but is there any chance of adding a |
@rcorre That shouldn't be too hard to add. Please take a look at the current |
I'll give it a shot, thanks! |
The flag is parsed manually, which seems like it should not be necessary based on other command implementations. I need to find out why registering the flag with the command isn't working. Currently this only works if the pull request is from a different repo. Resolves mislav#1206.
This is quite old, but perhaps it will be useful to someone. A work around is to checkout always to the same branch and remove it before the checkout, so there's always 1 branch with the last code review. #!/usr/bin/env bash
git checkout master &&
git branch -D review &&
hub pr checkout $1 review &&
git pull upstream master |
I often checkout a pull request as a one-time thing. I want to take a look at the code and run it, but afterwards I'll switch back to my own branches and don't want a new remote or branch hanging around. It would be nice to have
--no-remote
and--no-branch
flags forhub checkout
.I would expect
--no-remote
to do:With
--no-branch
it would be:Does this sound useful? I'd be happy to take a stab at it (I'd like to learn some go).
The text was updated successfully, but these errors were encountered: