Skip to content

Instantly share code, notes, and snippets.

@minhoryang
Last active September 15, 2021 18:56
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save minhoryang/ce0d1f6d8f5e34151cb104d42368af15 to your computer and use it in GitHub Desktop.
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
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment