Resume a merge conflict resolution at a later time












1















Situation



I'm merging files and I stopped because it was time to call it a day, but I hadn't finished the merge.



Problem



I wanted to make sure that I could resume the merge, and I couldn't find any information about this online so I tried it myself. The result being that I now have a partially merged filed, and the .orig, but not the modified local or remote.



Question



How do I resume this partial merge conflict resolution without having to start all over again?



What I did, exactly.



I merged a commit in to the current branch. Then I ran git mergetool which is meld. I said "ugh. . .its getting late, I can finish tomorrow." and saved all three files. Then I thought "maybe I should check to make sure I CAN resume tomorrow" so I try git mergetool again, but it says tells me that no files need merging.



I then do nothing and leave it in an uncommitted state thinking that at this point I can only do more harm.



What I've found.



The closest thing I've found that might be helpful is Reconflict the merge, after incorrect manual merge conflict resolution which isn't especially helpful.



What this would suggest is that I save what I have else where (ie mv file file.bu) do a hard reset, move the backup file back into place, then try the merge again so that I at least don't need to start completely over again.



However, since I haven't committed yet, unlike that poster, I figure there might be more i can do.










share|improve this question























  • Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

    – torek
    Nov 16 '18 at 0:49











  • There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

    – Nero gris
    Nov 16 '18 at 1:57






  • 1





    In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

    – torek
    Nov 16 '18 at 2:24











  • For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

    – Nero gris
    Nov 18 '18 at 20:19











  • That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

    – torek
    Nov 18 '18 at 20:42
















1















Situation



I'm merging files and I stopped because it was time to call it a day, but I hadn't finished the merge.



Problem



I wanted to make sure that I could resume the merge, and I couldn't find any information about this online so I tried it myself. The result being that I now have a partially merged filed, and the .orig, but not the modified local or remote.



Question



How do I resume this partial merge conflict resolution without having to start all over again?



What I did, exactly.



I merged a commit in to the current branch. Then I ran git mergetool which is meld. I said "ugh. . .its getting late, I can finish tomorrow." and saved all three files. Then I thought "maybe I should check to make sure I CAN resume tomorrow" so I try git mergetool again, but it says tells me that no files need merging.



I then do nothing and leave it in an uncommitted state thinking that at this point I can only do more harm.



What I've found.



The closest thing I've found that might be helpful is Reconflict the merge, after incorrect manual merge conflict resolution which isn't especially helpful.



What this would suggest is that I save what I have else where (ie mv file file.bu) do a hard reset, move the backup file back into place, then try the merge again so that I at least don't need to start completely over again.



However, since I haven't committed yet, unlike that poster, I figure there might be more i can do.










share|improve this question























  • Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

    – torek
    Nov 16 '18 at 0:49











  • There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

    – Nero gris
    Nov 16 '18 at 1:57






  • 1





    In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

    – torek
    Nov 16 '18 at 2:24











  • For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

    – Nero gris
    Nov 18 '18 at 20:19











  • That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

    – torek
    Nov 18 '18 at 20:42














1












1








1








Situation



I'm merging files and I stopped because it was time to call it a day, but I hadn't finished the merge.



Problem



I wanted to make sure that I could resume the merge, and I couldn't find any information about this online so I tried it myself. The result being that I now have a partially merged filed, and the .orig, but not the modified local or remote.



Question



How do I resume this partial merge conflict resolution without having to start all over again?



What I did, exactly.



I merged a commit in to the current branch. Then I ran git mergetool which is meld. I said "ugh. . .its getting late, I can finish tomorrow." and saved all three files. Then I thought "maybe I should check to make sure I CAN resume tomorrow" so I try git mergetool again, but it says tells me that no files need merging.



I then do nothing and leave it in an uncommitted state thinking that at this point I can only do more harm.



What I've found.



The closest thing I've found that might be helpful is Reconflict the merge, after incorrect manual merge conflict resolution which isn't especially helpful.



What this would suggest is that I save what I have else where (ie mv file file.bu) do a hard reset, move the backup file back into place, then try the merge again so that I at least don't need to start completely over again.



However, since I haven't committed yet, unlike that poster, I figure there might be more i can do.










share|improve this question














Situation



I'm merging files and I stopped because it was time to call it a day, but I hadn't finished the merge.



Problem



I wanted to make sure that I could resume the merge, and I couldn't find any information about this online so I tried it myself. The result being that I now have a partially merged filed, and the .orig, but not the modified local or remote.



Question



How do I resume this partial merge conflict resolution without having to start all over again?



What I did, exactly.



I merged a commit in to the current branch. Then I ran git mergetool which is meld. I said "ugh. . .its getting late, I can finish tomorrow." and saved all three files. Then I thought "maybe I should check to make sure I CAN resume tomorrow" so I try git mergetool again, but it says tells me that no files need merging.



I then do nothing and leave it in an uncommitted state thinking that at this point I can only do more harm.



What I've found.



The closest thing I've found that might be helpful is Reconflict the merge, after incorrect manual merge conflict resolution which isn't especially helpful.



What this would suggest is that I save what I have else where (ie mv file file.bu) do a hard reset, move the backup file back into place, then try the merge again so that I at least don't need to start completely over again.



However, since I haven't committed yet, unlike that poster, I figure there might be more i can do.







git merge git-merge meld mergetool






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 0:42









Nero grisNero gris

170210




170210













  • Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

    – torek
    Nov 16 '18 at 0:49











  • There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

    – Nero gris
    Nov 16 '18 at 1:57






  • 1





    In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

    – torek
    Nov 16 '18 at 2:24











  • For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

    – Nero gris
    Nov 18 '18 at 20:19











  • That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

    – torek
    Nov 18 '18 at 20:42



















  • Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

    – torek
    Nov 16 '18 at 0:49











  • There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

    – Nero gris
    Nov 16 '18 at 1:57






  • 1





    In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

    – torek
    Nov 16 '18 at 2:24











  • For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

    – Nero gris
    Nov 18 '18 at 20:19











  • That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

    – torek
    Nov 18 '18 at 20:42

















Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

– torek
Nov 16 '18 at 0:49





Git's support for suspending and resuming merges is not very good. I prefer to avoid git mergetool which insists on doing all the files without stopping. If you remember which files are done and which aren't, there may be a way to recover relatively simply, but you still have to completely merge any one file all the way through when letting git mergetool manage the operations.

– torek
Nov 16 '18 at 0:49













There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

– Nero gris
Nov 16 '18 at 1:57





There was only one messy file. In general, I try to avoid merging (or even commiting) more than one file at a time unless the changes are trivial.

– Nero gris
Nov 16 '18 at 1:57




1




1





In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

– torek
Nov 16 '18 at 2:24





In that case, save the partial merge (move the updated file out of the way) and use git checkout -m <file> to restore the merge-conflict and unmerged state. You can then run git mergetool again, or just edit the partially-merged file and use your merge-so-far side file to get back into the merge process.

– torek
Nov 16 '18 at 2:24













For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

– Nero gris
Nov 18 '18 at 20:19





For whatever reason, that did not work, and I ended up just starting from the beginning. Next time I'm just going to be more careful.

– Nero gris
Nov 18 '18 at 20:19













That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

– torek
Nov 18 '18 at 20:42





That's odd. It suggests that Git somehow lost the undo (REUC) record from the index. I don't think git mergetool does anything that would cause that, but I could be wrong here.

– torek
Nov 18 '18 at 20:42












1 Answer
1






active

oldest

votes


















0














Since you saved the files the easiest option maybe to restart the merge.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329840%2fresume-a-merge-conflict-resolution-at-a-later-time%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Since you saved the files the easiest option maybe to restart the merge.






    share|improve this answer




























      0














      Since you saved the files the easiest option maybe to restart the merge.






      share|improve this answer


























        0












        0








        0







        Since you saved the files the easiest option maybe to restart the merge.






        share|improve this answer













        Since you saved the files the easiest option maybe to restart the merge.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 16 '18 at 6:32









        tymtamtymtam

        6,75633657




        6,75633657
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329840%2fresume-a-merge-conflict-resolution-at-a-later-time%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Bressuire

            Vorschmack

            Quarantine