Last active
December 16, 2015 23:59
-
-
Save emmaguy/5517492 to your computer and use it in GitHub Desktop.
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
git rm --cached `git ls-files -i --exclude-from=.gitignore` >> When updating a .gitignore, remove stuff that's previously added | |
git diff HEAD^ HEAD >> diff last commit with the version before it | |
git push origin :abc >> delete remote branch abc | |
git branch -d abc >> delete local branch abc | |
git push <origin> <branch name> -- push up new branch | |
git submodule update --init --recursive | |
git stash show -p stash@{0} -- diff against stash | |
git tag -a v1.4 -m 'my version 1.4' | |
git push origin v1.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment