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

Re: git rerere to remember half-merged progress - valid use?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 11, 2018, 00:00 UTC
Message-ID
<xmqq1sgr4h2z.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAFU8umhtBxs9X+f1p3k8D6a4mue6OvM9cydrK-cRW8Nsq8Vcww@mail.gmail.com>
Ilya Kantor <iliakan@gmail.com> writes:
Show 6 quoted lines
> Let's say I'm merging a branch with many conflicts.
> I resolved some of them, but then can't proceed or need to switch elsewhere.
>
> Will it be a good practice to call `git rerere` to remember resolved
> conflicts, so that in the future
> when I re-merge, I get my half-done merge back?
As many of real world issues, the answer is "it depends".  

If you are absolutely sure about what you have resolved so far, then recording the resolutions for files that you have finished while there are still other files with conflicts to be resolved before switching away to another task is a very sensible thing to do.

On the other hand, recording resolutions you are not sure about means more work for you when you come back and attempt the merge again, as you would need to check resolutions of which files need to be nuked and redone (using "checkout -m" and "rerere forget").

My personal strategy is to avoid abandoning conflict resolution in the middle in the first place ;-), but in many cases I can be quite confident that I resolved conflicts in a file correctly without looking at conflicts in other files, so I do not think it is a bad practice to record resolution of files you resolved so far by calling "rerere" manually.

Previous: Ilya Kantor
Message 2 of 2 in “git rerere to remember half-merged progress - valid use?”
  1. Ilya KantorMar 10, 2018
  2. Junio C HamanoMar 11, 2018

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.