every time i git rebase my patchset on a new version of the original, do i have to manually resolve the conflicts again and again?
Asked
Active
Viewed 5,091 times
26
-
1I don't quite understand the problem here. Once you've rebased and resolved the conflicts, surely you are actually changing your commit to a commit premised on the new version of the original. The next time, you shouldn't have to re-resolve this because you're now applying the updated patch? – Jez Mar 28 '12 at 08:43
-
Does this answer your question? [Why does the same conflict reappear when I use git rebase?](https://stackoverflow.com/questions/31401754/why-does-the-same-conflict-reappear-when-i-use-git-rebase) – ggorlen Feb 11 '22 at 04:06
2 Answers
22
Check out git-rerere
.

Carl Norum
- 219,201
- 40
- 422
- 469
-
1Just to save people from reading all the documentation, you can pretty much just set `rerere.enabled` to true in your .gitconfig, and it'll take care of it all for you. – Cascabel Aug 18 '10 at 23:18
-
1In addition to the man pages, the Git maintainer Junio Hamano has a nice blog post about using rerere at http://gitster.livejournal.com/41795.html . – Pat Notz Aug 19 '10 at 04:35
-
if youre merging(pulling), just set rerere.enabled, if rebasing, it seems you have to git rerere before and after editing the conflicting file, manually – koo5 Aug 19 '10 at 17:56
-
And for those searching for how to set rerere.enabled to true in .gitconfig, just execute the command: git config --global rerere.enabled true – Teekin Feb 01 '23 at 10:11
-1
Depending on your repository you might be able to use the stash
git stash pop
git stash
http://gitready.com/beginner/2009/01/10/stashing-your-changes.html

Andreas Rehm
- 2,222
- 17
- 20