How to resolve conflict in pull request?











up vote
0
down vote

favorite












Suppose I have two branches, develop and release_v1, and I want to merge the release_v1 branch into develop.



I do a pull request to merge release_v1 to develop, but, after the pull request has been done, I discover that there is a conflict



How can I solve the conflict? which are the steps to perform?



Thanks in advance.










share|improve this question






















  • Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
    – clmno
    Nov 17 at 4:53

















up vote
0
down vote

favorite












Suppose I have two branches, develop and release_v1, and I want to merge the release_v1 branch into develop.



I do a pull request to merge release_v1 to develop, but, after the pull request has been done, I discover that there is a conflict



How can I solve the conflict? which are the steps to perform?



Thanks in advance.










share|improve this question






















  • Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
    – clmno
    Nov 17 at 4:53















up vote
0
down vote

favorite









up vote
0
down vote

favorite











Suppose I have two branches, develop and release_v1, and I want to merge the release_v1 branch into develop.



I do a pull request to merge release_v1 to develop, but, after the pull request has been done, I discover that there is a conflict



How can I solve the conflict? which are the steps to perform?



Thanks in advance.










share|improve this question













Suppose I have two branches, develop and release_v1, and I want to merge the release_v1 branch into develop.



I do a pull request to merge release_v1 to develop, but, after the pull request has been done, I discover that there is a conflict



How can I solve the conflict? which are the steps to perform?



Thanks in advance.







git bitbucket






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 at 23:38









user8545255

1467




1467












  • Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
    – clmno
    Nov 17 at 4:53




















  • Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
    – clmno
    Nov 17 at 4:53


















Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
– clmno
Nov 17 at 4:53






Did you try googling? Atlassian has a document answering your question confluence.atlassian.com/bitbucket/…
– clmno
Nov 17 at 4:53














1 Answer
1






active

oldest

votes

















up vote
0
down vote














How can I solve the conflict? which are the steps to perform?




Once you have conflicts follow those steps to fix it:



# clean your local working directory with a stash or commit

# update your local repo with the content of the remote branches
git fetch --all --prune

# checkout the release_v1 branch
git checkout release_v1

# update the content if required
git pull origin release_v1

# merge the desired branch
git merge origin/master


At this point, your release_v1 contains the content of the 2 branches with the conflicts
And now in your conflicts.



Once you have done with that



# add the fixed conflicts and commit
git add . && git commit
git push origin release_v1


Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved






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',
    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%2f53346762%2fhow-to-resolve-conflict-in-pull-request%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








    up vote
    0
    down vote














    How can I solve the conflict? which are the steps to perform?




    Once you have conflicts follow those steps to fix it:



    # clean your local working directory with a stash or commit

    # update your local repo with the content of the remote branches
    git fetch --all --prune

    # checkout the release_v1 branch
    git checkout release_v1

    # update the content if required
    git pull origin release_v1

    # merge the desired branch
    git merge origin/master


    At this point, your release_v1 contains the content of the 2 branches with the conflicts
    And now in your conflicts.



    Once you have done with that



    # add the fixed conflicts and commit
    git add . && git commit
    git push origin release_v1


    Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved






    share|improve this answer

























      up vote
      0
      down vote














      How can I solve the conflict? which are the steps to perform?




      Once you have conflicts follow those steps to fix it:



      # clean your local working directory with a stash or commit

      # update your local repo with the content of the remote branches
      git fetch --all --prune

      # checkout the release_v1 branch
      git checkout release_v1

      # update the content if required
      git pull origin release_v1

      # merge the desired branch
      git merge origin/master


      At this point, your release_v1 contains the content of the 2 branches with the conflicts
      And now in your conflicts.



      Once you have done with that



      # add the fixed conflicts and commit
      git add . && git commit
      git push origin release_v1


      Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote










        How can I solve the conflict? which are the steps to perform?




        Once you have conflicts follow those steps to fix it:



        # clean your local working directory with a stash or commit

        # update your local repo with the content of the remote branches
        git fetch --all --prune

        # checkout the release_v1 branch
        git checkout release_v1

        # update the content if required
        git pull origin release_v1

        # merge the desired branch
        git merge origin/master


        At this point, your release_v1 contains the content of the 2 branches with the conflicts
        And now in your conflicts.



        Once you have done with that



        # add the fixed conflicts and commit
        git add . && git commit
        git push origin release_v1


        Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved






        share|improve this answer













        How can I solve the conflict? which are the steps to perform?




        Once you have conflicts follow those steps to fix it:



        # clean your local working directory with a stash or commit

        # update your local repo with the content of the remote branches
        git fetch --all --prune

        # checkout the release_v1 branch
        git checkout release_v1

        # update the content if required
        git pull origin release_v1

        # merge the desired branch
        git merge origin/master


        At this point, your release_v1 contains the content of the 2 branches with the conflicts
        And now in your conflicts.



        Once you have done with that



        # add the fixed conflicts and commit
        git add . && git commit
        git push origin release_v1


        Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        CodeWizard

        48.7k126588




        48.7k126588






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53346762%2fhow-to-resolve-conflict-in-pull-request%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

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?