Skip to content

Instantly share code, notes, and snippets.

@laszlomiklosik
Created October 4, 2012 14:43
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laszlomiklosik/3833968 to your computer and use it in GitHub Desktop.
Save laszlomiklosik/3833968 to your computer and use it in GitHub Desktop.
Git: undo git rm for a single file
git checkout HEAD path/to/file
# Without HEAD it's not working because the file is not there anymore
@dooglio
Copy link

dooglio commented Nov 13, 2016

Thank you! It's amazing how simple this command actually is. Why is it so hard to find this in the man pages?!

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