Last active
February 10, 2020 02:52
-
-
Save salarmehr/229d71dfe83f17c874e1a3aa53b729ca to your computer and use it in GitHub Desktop.
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 branch --merged | egrep -v "(^\*|master|develop)" | xargs git branch -d | |
git reset HEAD^ # remove commit locally | |
git push origin +HEAD # force-push the new HEAD commits | |
#Delete a remote GIT branch | |
# To delete a remote branch you can use the following command: | |
git push {remote_name} --delete {branch_name} | |
git update-index --assume-unchanged {file} | |
git update-index --skip-worktree {file} | |
git config --global push.default current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment