-
-
Save user454322/3cc0e3328939bcbf40bc to your computer and use it in GitHub Desktop.
My 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
Status between branches | |
git diff --name-status master..branch_name | |
Merging while ignoring some files | |
git merge --no-commit --no-ff branch_name | |
git reset /path/to/ignored | |
Tags | |
git tag -l 'v1.4.2.*' | |
git tag -a v1.4 -m 'my version 1.4' | |
git push --tags | |
Override local | |
git fetch --all && git reset --hard origin/master | |
Delete a remote branch | |
git push origin --delete branch_name | |
git branch -D macports | |
Fix a commit message | |
git commit --amend -m "Fixed commit message" | |
git push <remote> <branch> --force | |
#To pipe the output to other commands | |
git status -s | |
# Do git pull --rebase stashing and un-stashing | |
git config pull.rebase true | |
git config rebase.autoStash true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment