Skip to content

Instantly share code, notes, and snippets.

@chelmertz
Created April 19, 2011 08:51
Show Gist options
  • Save chelmertz/927026 to your computer and use it in GitHub Desktop.
Save chelmertz/927026 to your computer and use it in GitHub Desktop.
git & bash - common commands
grep -l match_against in_files # -l only lists filenames
ls -1 # filenames STDIN ready
ls -x # space separated filenames
git show HEAD~1:index.html # what did I just commit?
git checkout HEAD~1 index.html # regret one file of a commit, not a complete rollback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment