Skip to content

Instantly share code, notes, and snippets.

@scrogson
Created March 21, 2013 04:56
Show Gist options
  • Save scrogson/5210789 to your computer and use it in GitHub Desktop.
Save scrogson/5210789 to your computer and use it in GitHub Desktop.
Collection of Git Tips

Deleted files on disk but wanted to remove them from git?

$ git rm $(git ls-files --deleted)

Need to undelete files you accidentally deleted?

$ git co -- $(git ls-files --deleted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment