{"thread":{"id":"48020","subject":"git rerere to remember half-merged progress - valid use?","startedAt":"2018-03-10T14:23:12Z","lastAt":"2018-03-11T00:00:18Z","messageCount":2,"participants":["Ilya Kantor","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"341397","messageId":"CAFU8umhtBxs9X+f1p3k8D6a4mue6OvM9cydrK-cRW8Nsq8Vcww@mail.gmail.com","threadId":"48020","inReplyTo":null,"subject":"git rerere to remember half-merged progress - valid use?","fromName":"Ilya Kantor","fromEmail":"iliakan@gmail.com","sentAt":"2018-03-10T14:22:46Z","receivedAt":"2018-03-10T14:23:12Z","isPatch":false,"sender":{"key":"iliakan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349336?v=4"},"body":"Hi,\n\nLet's say I'm merging a branch with many conflicts.\nI resolved some of them, but then can't proceed or need to switch elsewhere.\n\nWill it be a good practice to call `git rerere` to remember resolved\nconflicts, so that in the future\nwhen I re-merge, I get my half-done merge back?\n\nI couldn't find such use of rerere in the internet.\n\nHow can I save the merge/restore progress otherwise?\n\n---\nBest Regards,\nIlya Kantor\n"},{"id":"341405","messageId":"xmqq1sgr4h2z.fsf@gitster-ct.c.googlers.com","threadId":"48020","inReplyTo":"CAFU8umhtBxs9X+f1p3k8D6a4mue6OvM9cydrK-cRW8Nsq8Vcww@mail.gmail.com","subject":"Re: git rerere to remember half-merged progress - valid use?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-03-11T00:00:04Z","receivedAt":"2018-03-11T00:00:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ilya Kantor <iliakan@gmail.com> writes:\n\n> Let's say I'm merging a branch with many conflicts.\n> I resolved some of them, but then can't proceed or need to switch elsewhere.\n>\n> Will it be a good practice to call `git rerere` to remember resolved\n> conflicts, so that in the future\n> when I re-merge, I get my half-done merge back?\n\nAs many of real world issues, the answer is \"it depends\".  \n\nIf you are absolutely sure about what you have resolved so far, then\nrecording the resolutions for files that you have finished while\nthere are still other files with conflicts to be resolved before\nswitching away to another task is a very sensible thing to do.\n\nOn the other hand, recording resolutions you are not sure about\nmeans more work for you when you come back and attempt the merge\nagain, as you would need to check resolutions of which files need\nto be nuked and redone (using \"checkout -m\" and \"rerere forget\").\n\nMy personal strategy is to avoid abandoning conflict resolution in\nthe middle in the first place ;-), but in many cases I can be quite\nconfident that I resolved conflicts in a file correctly without\nlooking at conflicts in other files, so I do not think it is a bad\npractice to record resolution of files you resolved so far by\ncalling \"rerere\" manually.\n"}]}