Last active
December 19, 2015 21:48
-
-
Save neilff/6022532 to your computer and use it in GitHub Desktop.
Useful Git Commands
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
Force local repo to match git repo | |
----------------------------------------------------- | |
git fetch origin | |
git reset --hard origin/master | |
Remove directories or files from the repo | |
----------------------------------------------------- | |
git rm -r one-of-the-directories | |
git commit -m "Remove duplicated directory" | |
git push origin master | |
List all the files in the repo branch (HEAD) | |
----------------------------------------------------- | |
git ls-tree --full-tree -r HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment