Last active
April 13, 2016 04:45
-
-
Save maoosi/ee61ca2eb5f225e0a4c1879e6962af1f to your computer and use it in GitHub Desktop.
Some useful git commands.
This file contains hidden or 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
# Reset local repo to the last commit | |
git reset --hard | |
# Reset local repo to a specified commit | |
git reset --hard <SOME-COMMIT> | |
# Check last commit on your local | |
git log -1 | |
# Get remote url used on your local | |
git config --get remote.origin.url | |
# Remove a file or folder from a repo, without deleting it from your local | |
git rm --cached mylogfile.log | |
git rm --cached -r mydirectory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment