Last active
August 7, 2018 08:42
-
-
Save tushar-borole/9fcf731d067385037e2438e1782b1431 to your computer and use it in GitHub Desktop.
Git rebase and push
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
#Keep your local branch in sync with the latest commits in master. When opening a pull request, you must rebase off the latest master before merging. Rebase several times a day to minimize merge conflicts and to keep your code current. In your feature/chore/bug branch, grab the latest master and rebase: | |
git fetch origin master && git rebase --interactive origin/master | |
#Then you’ll need to change the lines for each commit message you don’t want to show from ‘pick’ to ‘squash’. | |
# Once any conflicts are resolved: | |
git push --force origin feature-branch-name | |
#Force pushing should only be done to a feature branching, where only you created commits. Never force push to master (ever, ever). | |
git pull orgin master | |
git pull pantheon master | |
git push pantheon master:master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment