git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Rebase Question

From
AOAndrew Ottaviano <andrew_o1995@live.com>
Date
May 12, 2021, 00:06 UTC
Message-ID
<MN2PR07MB59526F40B255183931649AD19C529@MN2PR07MB5952.namprd07.prod.outlook.com>
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. 
 
The solution that I thought of is instead
of resolving conflicts from the bottom up (starting with earliest history),
resolving from the top down (latest to earliest) and resolving the conflict in
the commit it occurred. If that doesn’t work (or I guess it might be the same
as a merge of master into my branch), then couldn’t git at least store the
conflict resolution? 
 
Maybe I’m silly for asking this question,
I just really like rebase because it is so clean and this is my one frustration
with this method. 

Thanks for humoring me 😊  Andrew Ottaviano 

Next: Jacob Keller
Message 1 of 6 in “Rebase Question”
  1. Andrew OttavianoMay 12, 2021
  2. Jacob KellerMay 12, 2021
  3. Bryan TurnerMay 12, 2021
  4. Jeff KingMay 12, 2021
  5. Junio C HamanoMay 12, 2021
  6. Felipe ContrerasMay 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.