-
Notifications
You must be signed in to change notification settings - Fork 1
Rebasing
There is a pretty good (and colorful) tutorial on what exactly is rebase and merge.
While it is important to understand the concepts, you don't have to try to read the entire doc right now. The idea here is to give you a quick recipes that you can use for most common scenarios.
WARNING Please, DO NOT use this button, if your Pull Requests gets into this state:
Instead, use the process described below to sync up your branch with master and push it to Github again. If you use the button in the UI, the pushed branch will get into a state, where it would be hard for you to push your new changes.
Suppose you are working on your branch my_awesome_feature. While you were doing that somebody submitted a new Pull Request into the master and you need to integrate those changes into your branch:
YOUR_BRANCH=my_awesome_feature
# This assumes that the origin is set to git://github.com/maksymko/codeu-starter-project, which is probably the case
# for most of you.
git fetch
# What we just did is we have *downloaded* new changes from the repo to our local computer.
# Next, let's integrate the changes from the upstream master into our local master
git rebase origin/master master
# Next, let's bring integrate the changes from the master into your own branch.
git rebase master $YOUR_BRANCH
If the rebase fails, it may ask you to resolve conflicts manually. This is very similar to what you would do with merge. However, this is unlikely to happen in a scenario where you have only one developer working on one branch.
