Last active
July 29, 2024 13:47
-
-
Save christopinka/1d1c37582b4f784c24f6b6c23213d026 to your computer and use it in GitHub Desktop.
git - reset pull request to previous commit to get outgoing changes locally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
taken from https://stackoverflow.com/a/72465195/2149240 | |
good when you want to run static analysis on only the change set during a code review. And/or limit the scope of your review to only what's changed. | |
ex: | |
git fetch origin pull/65/head:test-branch | |
git checkout test-branch | |
git log # press 'q' to exit | |
git reset --soft 7d7fe166cd878ed70c559c4e98faf2323532 | |
where the reset hash is the previous commit to the first commit for the pr. | |
$git show <pr-first-commit-hash>^1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where the reset hash is the previous commit to the first commit for the pr.
$git show <pr-first-commit-hash>^1