I forked a github repo and worked on my github repo.
I have made pull-requests and it was completed.
After that the upstream had some more commits so now I want to rebase, I guess thats what I have to do.
But I'm getting these merge conflicts:
First, rewinding head to replay your work on top of it...
Applying: Issue 135 homepage refresh
Using index info to reconstruct a base tree...
<stdin>:17: trailing whitespace.
%h4
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging app/views/layouts/application.html.haml
CONFLICT (content): Merge conflict in app/views/layouts/application.html.haml
Auto-merging app/views/home/index.html.haml
CONFLICT (content): Merge conflict in app/views/home/index.html.haml
Auto-merging app/views/home/_group_projects.html.haml
CONFLICT (content): Merge conflict in app/views/home/_group_projects.html.haml
Failed to merge in the changes.
Patch failed at 0001 Issue 135 homepage refresh
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".
I don't know how to fix these, please help.
Note: with Git 2.14.x/2.15 (Q3 2017), the
git rebase
message in case of conflicts will be clearer.See commit 5fdacc1 (16 Jul 2017) by William Duclot (
williamdclt
).(Merged by Junio C Hamano --
gitster
-- in commit 076eeec, 11 Aug 2017)Before:
After:
Rebasing can be a real headache. You have to resolve the merge conflicts and continue rebasing. For example you can use the merge tool (which differs depending on your settings)
Then add and commit your changes and go on
Good luck
When you have a conflict during rebase you have three options:
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.You can run
git rebase --skip
to completely skip the commit. That means that none of the changes introduced by the problematic commit will be included. It is very rare that you would choose this option.You can fix the conflict as iltempo said. When you're finished, you'll need to call
git rebase --continue
. My mergetool is kdiff3 but there are many more which you can use to solve conflicts. You only need to set your merge tool in git's settings so it can be invoked when you callgit mergetool
https://git-scm.com/docs/git-mergetoolIf none of the above works for you, then go for a walk and try again :)