Skip to content

Instantly share code, notes, and snippets.

@hectorcanto
Last active March 19, 2019 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hectorcanto/ae753287ab459590ca25fa11cd30c77e to your computer and use it in GitHub Desktop.
Save hectorcanto/ae753287ab459590ca25fa11cd30c77e to your computer and use it in GitHub Desktop.
[Git recurrent commands] Git commands that come useful from time to time #git
git rm --cached filename # Remove a file from repository without removing it locally
git reset --hard HEAD~2 # Delete last 2 commits, code included
git diff --name-only $commit # State the files changed in a commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment