Git: cannot do a partial commit during a merge (SourceTree)

Multi tool use
Multi tool use












9















After updating the SourceTree to it's latest version I am fighting with this issue. Assume following scenario:



There are file A, B and C under the version control and there is just one branch. In my working copy, I make some changes to the file A so it turns into a A' as well as the file B to B'. Someone else in his working copy makes a change to the file C -> C'.



I stage and commit my changes to the file B only. So I have a new revision: A, B', C and working copy A', B', C.



The other one commits his changes, so he makes a revision A, B, C' and pushes it to the origin.



And here it comes. When I perform the pull, I get some merge changes (the C'). And I want to commit a revision consisting of A, B', C'. I do not want to do now anything with the modified file A. However, the GIT, SourceTree resp., fails with:




fatal: cannot do a partial commit during a merge.




untill I stage or discard changes to the file A.



I am pretty sure the some previous version of SourceTree did not expose this behavior.



Update 2017/05



It appears in the most recent SourceTree version 2.0.20.1 this issue has been resolved. However, be sure you want to update to this version, because it contains lot of "bugs" (new features) I really dislike.










share|improve this question





























    9















    After updating the SourceTree to it's latest version I am fighting with this issue. Assume following scenario:



    There are file A, B and C under the version control and there is just one branch. In my working copy, I make some changes to the file A so it turns into a A' as well as the file B to B'. Someone else in his working copy makes a change to the file C -> C'.



    I stage and commit my changes to the file B only. So I have a new revision: A, B', C and working copy A', B', C.



    The other one commits his changes, so he makes a revision A, B, C' and pushes it to the origin.



    And here it comes. When I perform the pull, I get some merge changes (the C'). And I want to commit a revision consisting of A, B', C'. I do not want to do now anything with the modified file A. However, the GIT, SourceTree resp., fails with:




    fatal: cannot do a partial commit during a merge.




    untill I stage or discard changes to the file A.



    I am pretty sure the some previous version of SourceTree did not expose this behavior.



    Update 2017/05



    It appears in the most recent SourceTree version 2.0.20.1 this issue has been resolved. However, be sure you want to update to this version, because it contains lot of "bugs" (new features) I really dislike.










    share|improve this question



























      9












      9








      9


      1






      After updating the SourceTree to it's latest version I am fighting with this issue. Assume following scenario:



      There are file A, B and C under the version control and there is just one branch. In my working copy, I make some changes to the file A so it turns into a A' as well as the file B to B'. Someone else in his working copy makes a change to the file C -> C'.



      I stage and commit my changes to the file B only. So I have a new revision: A, B', C and working copy A', B', C.



      The other one commits his changes, so he makes a revision A, B, C' and pushes it to the origin.



      And here it comes. When I perform the pull, I get some merge changes (the C'). And I want to commit a revision consisting of A, B', C'. I do not want to do now anything with the modified file A. However, the GIT, SourceTree resp., fails with:




      fatal: cannot do a partial commit during a merge.




      untill I stage or discard changes to the file A.



      I am pretty sure the some previous version of SourceTree did not expose this behavior.



      Update 2017/05



      It appears in the most recent SourceTree version 2.0.20.1 this issue has been resolved. However, be sure you want to update to this version, because it contains lot of "bugs" (new features) I really dislike.










      share|improve this question
















      After updating the SourceTree to it's latest version I am fighting with this issue. Assume following scenario:



      There are file A, B and C under the version control and there is just one branch. In my working copy, I make some changes to the file A so it turns into a A' as well as the file B to B'. Someone else in his working copy makes a change to the file C -> C'.



      I stage and commit my changes to the file B only. So I have a new revision: A, B', C and working copy A', B', C.



      The other one commits his changes, so he makes a revision A, B, C' and pushes it to the origin.



      And here it comes. When I perform the pull, I get some merge changes (the C'). And I want to commit a revision consisting of A, B', C'. I do not want to do now anything with the modified file A. However, the GIT, SourceTree resp., fails with:




      fatal: cannot do a partial commit during a merge.




      untill I stage or discard changes to the file A.



      I am pretty sure the some previous version of SourceTree did not expose this behavior.



      Update 2017/05



      It appears in the most recent SourceTree version 2.0.20.1 this issue has been resolved. However, be sure you want to update to this version, because it contains lot of "bugs" (new features) I really dislike.







      git version-control git-merge atlassian-sourcetree






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 15 '17 at 14:50







      Jan Drozen

















      asked Sep 21 '16 at 12:19









      Jan DrozenJan Drozen

      3512417




      3512417
























          2 Answers
          2






          active

          oldest

          votes


















          0















          fatal: cannot do a partial commit during a merge.




          This indicates that your merge is still in progress, there could be some conflicts which you still need to resolve.



          Please select Conflicts from the drop down box as screenshot and you should be able to see a list of conflicted files with a triangle icon. Resolving these and then doing a commit should fix your problem.



          enter image description here



          This post should give a brief idea of how to configure and use an external tool to resolve merge conflicts - How to interactively (visually) resolve conflicts in SourceTree / git



          If you still can't make up, you may stash your changes. Pull from origin and apply stash to fix the same.



          Edits



          You can also automate all such operations using "custom action". One sample script to do a stash >> pull >> apply stash is copied below



          git -c diff.mnemonicprefix=false -c core.quotepath=false stash save temp
          git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
          git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin <<local path goes here>>
          git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
          git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}





          share|improve this answer





















          • 1





            Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

            – Jan Drozen
            Sep 23 '16 at 10:51













          • You may also automate all such operations using "custom action", please refer edits

            – Arvin
            Oct 3 '16 at 13:08



















          0














          The following answer to this question worked for me.




          "You can manually delete .git/MERGE_HEAD and Git won't be able to tell
          that you were just doing a merge. It will let you amend the previous
          commit with the changes in your index just like normal."







          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%2f39616390%2fgit-cannot-do-a-partial-commit-during-a-merge-sourcetree%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0















            fatal: cannot do a partial commit during a merge.




            This indicates that your merge is still in progress, there could be some conflicts which you still need to resolve.



            Please select Conflicts from the drop down box as screenshot and you should be able to see a list of conflicted files with a triangle icon. Resolving these and then doing a commit should fix your problem.



            enter image description here



            This post should give a brief idea of how to configure and use an external tool to resolve merge conflicts - How to interactively (visually) resolve conflicts in SourceTree / git



            If you still can't make up, you may stash your changes. Pull from origin and apply stash to fix the same.



            Edits



            You can also automate all such operations using "custom action". One sample script to do a stash >> pull >> apply stash is copied below



            git -c diff.mnemonicprefix=false -c core.quotepath=false stash save temp
            git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
            git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin <<local path goes here>>
            git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
            git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}





            share|improve this answer





















            • 1





              Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

              – Jan Drozen
              Sep 23 '16 at 10:51













            • You may also automate all such operations using "custom action", please refer edits

              – Arvin
              Oct 3 '16 at 13:08
















            0















            fatal: cannot do a partial commit during a merge.




            This indicates that your merge is still in progress, there could be some conflicts which you still need to resolve.



            Please select Conflicts from the drop down box as screenshot and you should be able to see a list of conflicted files with a triangle icon. Resolving these and then doing a commit should fix your problem.



            enter image description here



            This post should give a brief idea of how to configure and use an external tool to resolve merge conflicts - How to interactively (visually) resolve conflicts in SourceTree / git



            If you still can't make up, you may stash your changes. Pull from origin and apply stash to fix the same.



            Edits



            You can also automate all such operations using "custom action". One sample script to do a stash >> pull >> apply stash is copied below



            git -c diff.mnemonicprefix=false -c core.quotepath=false stash save temp
            git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
            git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin <<local path goes here>>
            git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
            git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}





            share|improve this answer





















            • 1





              Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

              – Jan Drozen
              Sep 23 '16 at 10:51













            • You may also automate all such operations using "custom action", please refer edits

              – Arvin
              Oct 3 '16 at 13:08














            0












            0








            0








            fatal: cannot do a partial commit during a merge.




            This indicates that your merge is still in progress, there could be some conflicts which you still need to resolve.



            Please select Conflicts from the drop down box as screenshot and you should be able to see a list of conflicted files with a triangle icon. Resolving these and then doing a commit should fix your problem.



            enter image description here



            This post should give a brief idea of how to configure and use an external tool to resolve merge conflicts - How to interactively (visually) resolve conflicts in SourceTree / git



            If you still can't make up, you may stash your changes. Pull from origin and apply stash to fix the same.



            Edits



            You can also automate all such operations using "custom action". One sample script to do a stash >> pull >> apply stash is copied below



            git -c diff.mnemonicprefix=false -c core.quotepath=false stash save temp
            git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
            git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin <<local path goes here>>
            git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
            git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}





            share|improve this answer
















            fatal: cannot do a partial commit during a merge.




            This indicates that your merge is still in progress, there could be some conflicts which you still need to resolve.



            Please select Conflicts from the drop down box as screenshot and you should be able to see a list of conflicted files with a triangle icon. Resolving these and then doing a commit should fix your problem.



            enter image description here



            This post should give a brief idea of how to configure and use an external tool to resolve merge conflicts - How to interactively (visually) resolve conflicts in SourceTree / git



            If you still can't make up, you may stash your changes. Pull from origin and apply stash to fix the same.



            Edits



            You can also automate all such operations using "custom action". One sample script to do a stash >> pull >> apply stash is copied below



            git -c diff.mnemonicprefix=false -c core.quotepath=false stash save temp
            git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
            git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin <<local path goes here>>
            git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
            git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 12:34









            Community

            11




            11










            answered Sep 22 '16 at 14:11









            ArvinArvin

            69468




            69468








            • 1





              Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

              – Jan Drozen
              Sep 23 '16 at 10:51













            • You may also automate all such operations using "custom action", please refer edits

              – Arvin
              Oct 3 '16 at 13:08














            • 1





              Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

              – Jan Drozen
              Sep 23 '16 at 10:51













            • You may also automate all such operations using "custom action", please refer edits

              – Arvin
              Oct 3 '16 at 13:08








            1




            1





            Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

            – Jan Drozen
            Sep 23 '16 at 10:51







            Thank you for your response. In the case in the original question there is no conflict since the file A is not changed and committed. I know I can make a stash, but I do not want to do it everytime I am performing a merge. Especially when this worked well in previous versions.

            – Jan Drozen
            Sep 23 '16 at 10:51















            You may also automate all such operations using "custom action", please refer edits

            – Arvin
            Oct 3 '16 at 13:08





            You may also automate all such operations using "custom action", please refer edits

            – Arvin
            Oct 3 '16 at 13:08













            0














            The following answer to this question worked for me.




            "You can manually delete .git/MERGE_HEAD and Git won't be able to tell
            that you were just doing a merge. It will let you amend the previous
            commit with the changes in your index just like normal."







            share|improve this answer




























              0














              The following answer to this question worked for me.




              "You can manually delete .git/MERGE_HEAD and Git won't be able to tell
              that you were just doing a merge. It will let you amend the previous
              commit with the changes in your index just like normal."







              share|improve this answer


























                0












                0








                0







                The following answer to this question worked for me.




                "You can manually delete .git/MERGE_HEAD and Git won't be able to tell
                that you were just doing a merge. It will let you amend the previous
                commit with the changes in your index just like normal."







                share|improve this answer













                The following answer to this question worked for me.




                "You can manually delete .git/MERGE_HEAD and Git won't be able to tell
                that you were just doing a merge. It will let you amend the previous
                commit with the changes in your index just like normal."








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 26 '17 at 14:37









                javaPlease42javaPlease42

                2,30412446




                2,30412446






























                    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%2f39616390%2fgit-cannot-do-a-partial-commit-during-a-merge-sourcetree%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







                    Gn,CL,Y puumhHGniVsfaXe s3WRgMn,gdJlpbu,Ps7zhbA
                    YWShzW,9,F3qx9lo6NE8t8QvFJDZ3Hs2lfBkFCI ksKqXadNE

                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas