Skip to content

Instantly share code, notes, and snippets.

@AskPascal
Last active June 23, 2022 11:20
Show Gist options
  • Select an option

  • Save AskPascal/3e8072fbaba787c80db701ee7d1128e5 to your computer and use it in GitHub Desktop.

Select an option

Save AskPascal/3e8072fbaba787c80db701ee7d1128e5 to your computer and use it in GitHub Desktop.
Git: revert files changed in one commit (A) to the state they were in in another commit (B)
git checkout <commitB> $(git diff-tree --no-commit-id --name-only -r <commitA> | grep "_snaps")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment