Last active
March 28, 2019 14:58
-
-
Save glpunk/24a48e4704bba152bfbbdee3c5fd561e to your computer and use it in GitHub Desktop.
Git Commands #GIT
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
# git delete branch with force | |
git branch -D branch_name | |
# git rename branch | |
git branch -m <oldname> <newname> | |
# ... or if the current branch | |
git branch -m <newname> | |
# change up stream | |
git branch branch_name -u your_new_remote/branch_name | |
# ... or in current branch | |
git branch -u origin/develop | |
# reset branch to current origin status | |
git checkout mybranch | |
git reset --hard origin/mybranch | |
# take specific comit | |
git cherry-pick | |
# force push to remote branch with different name | |
git push --force origin qa:develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment