In git, how can I get a file from the server, after I merged two branches on production, into my local branch?










-1















I did a merge of branch A and branch B on the production server(Branch B was merged into branch A). Now there are files that are in branch A that came from branch B as expected. Unfortunately, locally when in Branch A, those files that came from branch B are missing. However, they are in Branch A on the server. How can I pull those files?










share|improve this question


























    -1















    I did a merge of branch A and branch B on the production server(Branch B was merged into branch A). Now there are files that are in branch A that came from branch B as expected. Unfortunately, locally when in Branch A, those files that came from branch B are missing. However, they are in Branch A on the server. How can I pull those files?










    share|improve this question
























      -1












      -1








      -1








      I did a merge of branch A and branch B on the production server(Branch B was merged into branch A). Now there are files that are in branch A that came from branch B as expected. Unfortunately, locally when in Branch A, those files that came from branch B are missing. However, they are in Branch A on the server. How can I pull those files?










      share|improve this question














      I did a merge of branch A and branch B on the production server(Branch B was merged into branch A). Now there are files that are in branch A that came from branch B as expected. Unfortunately, locally when in Branch A, those files that came from branch B are missing. However, they are in Branch A on the server. How can I pull those files?







      git git-merge git-pull






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 21:08









      SJW525SJW525

      13




      13






















          1 Answer
          1






          active

          oldest

          votes


















          0














          In my opinion when you do a pull merge the files from the server should come into your local branch.



          When this does not happen then try to clone the whole repository again locally from the server.






          share|improve this answer























          • I did that and it still is missing the files. I did the below: git clone /path/to/repo

            – SJW525
            Nov 19 '18 at 16:36












          • I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

            – SJW525
            Nov 19 '18 at 16:57











          • With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:36











          • What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:38










          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%2f53327922%2fin-git-how-can-i-get-a-file-from-the-server-after-i-merged-two-branches-on-pro%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














          In my opinion when you do a pull merge the files from the server should come into your local branch.



          When this does not happen then try to clone the whole repository again locally from the server.






          share|improve this answer























          • I did that and it still is missing the files. I did the below: git clone /path/to/repo

            – SJW525
            Nov 19 '18 at 16:36












          • I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

            – SJW525
            Nov 19 '18 at 16:57











          • With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:36











          • What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:38















          0














          In my opinion when you do a pull merge the files from the server should come into your local branch.



          When this does not happen then try to clone the whole repository again locally from the server.






          share|improve this answer























          • I did that and it still is missing the files. I did the below: git clone /path/to/repo

            – SJW525
            Nov 19 '18 at 16:36












          • I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

            – SJW525
            Nov 19 '18 at 16:57











          • With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:36











          • What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:38













          0












          0








          0







          In my opinion when you do a pull merge the files from the server should come into your local branch.



          When this does not happen then try to clone the whole repository again locally from the server.






          share|improve this answer













          In my opinion when you do a pull merge the files from the server should come into your local branch.



          When this does not happen then try to clone the whole repository again locally from the server.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 15 '18 at 21:22









          Zsombor ZsuffaZsombor Zsuffa

          314




          314












          • I did that and it still is missing the files. I did the below: git clone /path/to/repo

            – SJW525
            Nov 19 '18 at 16:36












          • I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

            – SJW525
            Nov 19 '18 at 16:57











          • With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:36











          • What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:38

















          • I did that and it still is missing the files. I did the below: git clone /path/to/repo

            – SJW525
            Nov 19 '18 at 16:36












          • I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

            – SJW525
            Nov 19 '18 at 16:57











          • With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:36











          • What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

            – Zsombor Zsuffa
            Nov 20 '18 at 8:38
















          I did that and it still is missing the files. I did the below: git clone /path/to/repo

          – SJW525
          Nov 19 '18 at 16:36






          I did that and it still is missing the files. I did the below: git clone /path/to/repo

          – SJW525
          Nov 19 '18 at 16:36














          I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

          – SJW525
          Nov 19 '18 at 16:57





          I only merged the brancheson the production server. I didn't merge them on my local. I think I have to do that

          – SJW525
          Nov 19 '18 at 16:57













          With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

          – Zsombor Zsuffa
          Nov 20 '18 at 8:36





          With the clone you should get the merged locally, so you should not merge them locally again. When files are missing that means that they were not committed and pushed to the remote.

          – Zsombor Zsuffa
          Nov 20 '18 at 8:36













          What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

          – Zsombor Zsuffa
          Nov 20 '18 at 8:38





          What you also can do is that after the clone you add back the files one by one and you commit them again. This would mess your history a bit but you would have at least a working current version. By merging locally, you can do that too and then you compare the merged and cloned from remote with your merged locally.

          – Zsombor Zsuffa
          Nov 20 '18 at 8:38



















          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%2f53327922%2fin-git-how-can-i-get-a-file-from-the-server-after-i-merged-two-branches-on-pro%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

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          ReactJS Fetched API data displays live - need Data displayed static

          政党