Skip to content

Instantly share code, notes, and snippets.

@namuan
Created August 26, 2018 18:30
Show Gist options
  • Save namuan/fc6ac40b89b186f1f5a4fae6213abf2d to your computer and use it in GitHub Desktop.
Save namuan/fc6ac40b89b186f1f5a4fae6213abf2d to your computer and use it in GitHub Desktop.
[Find deleted file in Git] #git #tips
# Find file if we dont have the full path
git log --diff-filter=D --summary | grep delete | grep Sub

# Once we have the full path, this will give log on the file
git log --all --  src/groovy/.../../shared/serialize/Somefile.groovy

# Checkout file / or check with Source tree
git checkout <git-sha-here> src/groovy/.../../shared/serialize/Somefile.groovy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment