It seems, I am lacking some understanding of git.
I am currently in the process of an extensive
git rebase -i --root
on origin/main(master), which is not a fork.
- Commits are not reordered
- There are several merge commits into main
My todo file contains only
- pick and
- reword,
as many commit messages must be changed to pass commit linting.
Why do I have to manually resolve such merge conflicts?
CONFLICT (content): Merge conflict in file1
CONFLICT (content): Merge conflict in file2
I would expect that changing commit messages should be possible independently of the changes in the code base.
Could one reason be past forced updates?
>Solution :
Because you did not use --rebase-merges, you are missing merges with changes (like conflict resolution)… and that is causing the current conflicts in the rebase. If you only will do a reword of a commit (and you won’t change any files), you should try:
git rebase --rebase-merges -i --root
Then, everytime you hit a conflict (like in some merge commits where you faced them originally), you can do this:
git restore --staged --worktree --source=REBASE_HEAD -- .
git rebase --continue
Until the rebase is finished.