John Chase’s Blog

The Personal Blog of John Chase

Useful GIT Commands

without comments

To show deleted files:

“git ls-files -d

To restore the deleted files use:

“git ls-files -d | xargs git checkout

View your log:

“git log”

Reset to a previous head

"git reset --hard HEAD~1" (The HEAD~1 means the commit before head.)

"git reset --hard <sha1-commit-id>

Written by admin

October 13th, 2011 at 7:34 pm

Posted in Uncategorized

Leave a Reply