Re: Rebase Question
- From
Bryan Turner <bturner@atlassian.com>
- Date
- May 12, 2021, 00:29 UTC
- Message-ID
- <CAGyf7-GEA0mtxUxqEjYsfqM4Te-5JO5_nW0S6Vitdmywz1J7mg@mail.gmail.com>
- In-Reply-To
- <MN2PR07MB59526F40B255183931649AD19C529@MN2PR07MB5952.namprd07.prod.outlook.com>
On Tue, May 11, 2021 at 5:07 PM Andrew Ottaviano <andrew_o1995@live.com> wrote:
Show 16 quoted lines
> > Hello all! > > I’ve used git for a few years now and I > think it is an amazing tool! Thank you for your hard work in > developing/maintaining it! I really appreciate it! > > I have a question. Let’s say that my > colleague and I branch off of master and are working. Let’s say I’m 5 commits > ahead of master and my colleague merges in ahead of me. The logical thing in my > mind is to rebase off of master. The difficulty with this is that if I have > merge conflicts that show up on my first commit, I have to resolve that stupid > thing for every subsequent commit. I could squash, but then I loose branch > history, so I don’t really want to do that. I could rebase in interactive mode, > but if I recall, I still need to resolve all the conflicts on every commit > before it squashes.
Have you investigated git rerere[1] at all? Documentation indicates it works for rebase as well as merge, so it might be possible to train that to resolve the conflicts.
[1] https://git-scm.com/docs/git-rerere
(Pardon the re-send; Gmail being trash.)