Skip to content

Creating a pull request and rebasing

a-alexus-student edited this page Jul 6, 2020 · 2 revisions

Changes to master should only be made with pull requests.

git rebase

If changes have been applied to master and you want to apply these changes to the feature branch you are working on, you will need to rebase your feature branch so it's up to date with master git rebase -i master

Like merging, this has the potential to cause merge conflicts. If this happens, you will need to fix these conflicts and then git rebase --continue

You can run git rebase --abort to completely undo the rebase. Git will return you to your branch's state as it was before git rebase was called.

When you think your feature branch is ready to be merged into master, rebase your feature branch so its up to date with master and then create a pull request. Branch protections have been set up so two people need to review a pull request before it is applied to master.

While waiting for your pull request to be approved, it may happen that changes to master are made and your pull request is no longer up to date with master and the changes in your branch conflict with the changes in master. To resolve this, rebase your local branch so it's up to date with master and then push --force these changes on your feature branch. You have to force push because you are rewriting the history on your remote feature branch to now include the changes that were made to master as well as any additional changes you made.

DO NOT FORCE PUSH TO MASTER

Clone this wiki locally