Last active
March 19, 2019 11:43
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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