Skip to content

Instantly share code, notes, and snippets.

@minhoryang

minhoryang/git-pr.sh

Last active Nov 8, 2019
Embed
What would you like to do?
Fetching Github PR # Only (for CI)
git init
git remote add origin <REMOTE_URL>
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
git fetch --no-tags --depth=1 --recurse-submodules=yes --multiple -j origin pull/<PR_NO>/head:refs/remotes/origin/pr/<PR_NO>
git checkout origin/pr/<PR_NO>
git log # one commit!
git describe —all # remotes/origin/pr/259
@minhoryang

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.