


If you would prefer to skip this patch, instead run "git rebase -skip". When you have resolved this problem run "git rebase -continue". Using index info to reconstruct a base tree.įalling back to patching base and 3-way merge.ĬONFLICT (content): Merge conflict in config/environment.rb Unlike a merge, which merges two branches in one go, rebasing applies the changes from one branch one by one.īecause of that, conflicts will be served in smaller chunks making them easier to fix and understand: It’s as if you didn’t start working in the login branch before the commits you pulled in were made 1. This bases the current branch onto the other branch.įirst, rewinding head to replay your work on top of it. Git’s rebase command temporarily rewinds the commits on your current branch, pulls in the commits from the other branch and reapplies the rewinded commits back on top. Instead of merging the main branch in, rebasing it rewrites history to make sure all commits on the login branch are based on the current state of the main branch.įigure 3: Rebasing applies the commits from the login branch on top of the main branch. In this case, it’s not important to know when main was merged in, and there is nobody else working on the login branch. When working on a branch with multiple people, merging is preferable to rebasing as it leaves the branch history intact.įigure 2: Merging the two branches results in a merge commit. Merging a branch is useful when the moment of merging is significant.įor example, when a feature is merged into the main branch, or when a new release is pushed. Merging the main branch back into yours would result in a merge commit, which includes the changes between both branches and exists to show where a merge occurred.
