Last active
August 2, 2016 18:25
-
-
Save daredrum/7b3a0dbaea35463bb2227ac88fd78e30 to your computer and use it in GitHub Desktop.
Git methods
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
| ### Override local branch from remote | |
| git fetch origin feature_branch | |
| git reset --hard origin/feature_branch | |
| ### Remove branch remotely and locally | |
| git push origin feature_branch | |
| git branch -D feature_branch | |
| ### Edit old commits | |
| git rebase --i 'bbc643cd^' | |
| # change 'pick' on 'edit' and after edit code # | |
| git commit --all --amend --no-edit | |
| git rebase --continue | |
| git push -f origin branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment