git pull origin develop vs git merge












0














I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?



$git checkout feature/migration
Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
Switched to a new branch 'feature/migration'


$git pull origin develop
From https://github.com/xxx
* branch develop -> FETCH_HEAD
Auto-merging web/package.json
Auto-merging package.json
Merge made by the 'recursive' strategy.
api/src/entity/User.ts | 8 ++++++ ... more


I did



git reset --hard  619c69ae


log BEFORE reset



$git lg1
* 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
|
| * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
| |
* | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)


glog AFTER reset



*   619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
|
| | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
| | |
| | |/
| |/|
| * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
|/ /









share|improve this question





























    0














    I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?



    $git checkout feature/migration
    Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
    Switched to a new branch 'feature/migration'


    $git pull origin develop
    From https://github.com/xxx
    * branch develop -> FETCH_HEAD
    Auto-merging web/package.json
    Auto-merging package.json
    Merge made by the 'recursive' strategy.
    api/src/entity/User.ts | 8 ++++++ ... more


    I did



    git reset --hard  619c69ae


    log BEFORE reset



    $git lg1
    * 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
    |
    | * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
    | |
    * | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)


    glog AFTER reset



    *   619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
    |
    | | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
    | | |
    | | |/
    | |/|
    | * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
    |/ /









    share|improve this question



























      0












      0








      0







      I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?



      $git checkout feature/migration
      Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
      Switched to a new branch 'feature/migration'


      $git pull origin develop
      From https://github.com/xxx
      * branch develop -> FETCH_HEAD
      Auto-merging web/package.json
      Auto-merging package.json
      Merge made by the 'recursive' strategy.
      api/src/entity/User.ts | 8 ++++++ ... more


      I did



      git reset --hard  619c69ae


      log BEFORE reset



      $git lg1
      * 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
      |
      | * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
      | |
      * | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)


      glog AFTER reset



      *   619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
      |
      | | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
      | | |
      | | |/
      | |/|
      | * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
      |/ /









      share|improve this question















      I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?



      $git checkout feature/migration
      Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
      Switched to a new branch 'feature/migration'


      $git pull origin develop
      From https://github.com/xxx
      * branch develop -> FETCH_HEAD
      Auto-merging web/package.json
      Auto-merging package.json
      Merge made by the 'recursive' strategy.
      api/src/entity/User.ts | 8 ++++++ ... more


      I did



      git reset --hard  619c69ae


      log BEFORE reset



      $git lg1
      * 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
      |
      | * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
      | |
      * | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)


      glog AFTER reset



      *   619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
      |
      | | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
      | | |
      | | |/
      | |/|
      | * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
      |/ /






      git






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 8:11

























      asked Nov 23 '18 at 7:44









      DDave

      390315




      390315
























          2 Answers
          2






          active

          oldest

          votes


















          0














          You are ok to proceed with your development.
          But anyway main diffs between rebase and merge are




          • You get a much cleaner project history from rebase by eliminating unnessasary merge commits and re-writing your history in a liner order.


          If you still wants to go back and try rebase then,



          Undo merge



          git reset --hard ORIG_HEAD


          Then rebase



          git rebase develop





          share|improve this answer





















          • I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
            – DDave
            Nov 23 '18 at 8:08












          • Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
            – Nuwan Attanayake
            Nov 23 '18 at 8:12










          • the problem i've read late your answer, check my log
            – DDave
            Nov 23 '18 at 8:13










          • i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
            – Nuwan Attanayake
            Nov 23 '18 at 8:29



















          0














          It is OK. We can roughly say git pull = git fetch + git merge.



          Also, sometimes git rebase can cause disasters, so you may consider using merge rather than rebase.



          However, git rebase vs git merge can be different point of view for histories.






          share|improve this answer





















          • can you check my log if all is ok?
            – DDave
            Nov 23 '18 at 8:22











          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%2f53442527%2fgit-pull-origin-develop-vs-git-merge%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














          You are ok to proceed with your development.
          But anyway main diffs between rebase and merge are




          • You get a much cleaner project history from rebase by eliminating unnessasary merge commits and re-writing your history in a liner order.


          If you still wants to go back and try rebase then,



          Undo merge



          git reset --hard ORIG_HEAD


          Then rebase



          git rebase develop





          share|improve this answer





















          • I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
            – DDave
            Nov 23 '18 at 8:08












          • Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
            – Nuwan Attanayake
            Nov 23 '18 at 8:12










          • the problem i've read late your answer, check my log
            – DDave
            Nov 23 '18 at 8:13










          • i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
            – Nuwan Attanayake
            Nov 23 '18 at 8:29
















          0














          You are ok to proceed with your development.
          But anyway main diffs between rebase and merge are




          • You get a much cleaner project history from rebase by eliminating unnessasary merge commits and re-writing your history in a liner order.


          If you still wants to go back and try rebase then,



          Undo merge



          git reset --hard ORIG_HEAD


          Then rebase



          git rebase develop





          share|improve this answer





















          • I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
            – DDave
            Nov 23 '18 at 8:08












          • Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
            – Nuwan Attanayake
            Nov 23 '18 at 8:12










          • the problem i've read late your answer, check my log
            – DDave
            Nov 23 '18 at 8:13










          • i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
            – Nuwan Attanayake
            Nov 23 '18 at 8:29














          0












          0








          0






          You are ok to proceed with your development.
          But anyway main diffs between rebase and merge are




          • You get a much cleaner project history from rebase by eliminating unnessasary merge commits and re-writing your history in a liner order.


          If you still wants to go back and try rebase then,



          Undo merge



          git reset --hard ORIG_HEAD


          Then rebase



          git rebase develop





          share|improve this answer












          You are ok to proceed with your development.
          But anyway main diffs between rebase and merge are




          • You get a much cleaner project history from rebase by eliminating unnessasary merge commits and re-writing your history in a liner order.


          If you still wants to go back and try rebase then,



          Undo merge



          git reset --hard ORIG_HEAD


          Then rebase



          git rebase develop






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 '18 at 8:04









          Nuwan Attanayake

          606414




          606414












          • I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
            – DDave
            Nov 23 '18 at 8:08












          • Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
            – Nuwan Attanayake
            Nov 23 '18 at 8:12










          • the problem i've read late your answer, check my log
            – DDave
            Nov 23 '18 at 8:13










          • i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
            – Nuwan Attanayake
            Nov 23 '18 at 8:29


















          • I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
            – DDave
            Nov 23 '18 at 8:08












          • Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
            – Nuwan Attanayake
            Nov 23 '18 at 8:12










          • the problem i've read late your answer, check my log
            – DDave
            Nov 23 '18 at 8:13










          • i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
            – Nuwan Attanayake
            Nov 23 '18 at 8:29
















          I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
          – DDave
          Nov 23 '18 at 8:08






          I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
          – DDave
          Nov 23 '18 at 8:08














          Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
          – Nuwan Attanayake
          Nov 23 '18 at 8:12




          Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try git reset --hard ORIG_HEAD
          – Nuwan Attanayake
          Nov 23 '18 at 8:12












          the problem i've read late your answer, check my log
          – DDave
          Nov 23 '18 at 8:13




          the problem i've read late your answer, check my log
          – DDave
          Nov 23 '18 at 8:13












          i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
          – Nuwan Attanayake
          Nov 23 '18 at 8:29




          i see you have reset everything into the commit 619c69ae.Which means you are now just got back to your initial state(state before you git pull origin develop).It should OK for you to do git rebase develop now.
          – Nuwan Attanayake
          Nov 23 '18 at 8:29













          0














          It is OK. We can roughly say git pull = git fetch + git merge.



          Also, sometimes git rebase can cause disasters, so you may consider using merge rather than rebase.



          However, git rebase vs git merge can be different point of view for histories.






          share|improve this answer





















          • can you check my log if all is ok?
            – DDave
            Nov 23 '18 at 8:22
















          0














          It is OK. We can roughly say git pull = git fetch + git merge.



          Also, sometimes git rebase can cause disasters, so you may consider using merge rather than rebase.



          However, git rebase vs git merge can be different point of view for histories.






          share|improve this answer





















          • can you check my log if all is ok?
            – DDave
            Nov 23 '18 at 8:22














          0












          0








          0






          It is OK. We can roughly say git pull = git fetch + git merge.



          Also, sometimes git rebase can cause disasters, so you may consider using merge rather than rebase.



          However, git rebase vs git merge can be different point of view for histories.






          share|improve this answer












          It is OK. We can roughly say git pull = git fetch + git merge.



          Also, sometimes git rebase can cause disasters, so you may consider using merge rather than rebase.



          However, git rebase vs git merge can be different point of view for histories.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 '18 at 7:54









          Geno Chen

          1,2312719




          1,2312719












          • can you check my log if all is ok?
            – DDave
            Nov 23 '18 at 8:22


















          • can you check my log if all is ok?
            – DDave
            Nov 23 '18 at 8:22
















          can you check my log if all is ok?
          – DDave
          Nov 23 '18 at 8:22




          can you check my log if all is ok?
          – DDave
          Nov 23 '18 at 8:22


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f53442527%2fgit-pull-origin-develop-vs-git-merge%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

          What visual should I use to simply compare current year value vs last year in Power BI desktop

          How to ignore python UserWarning in pytest?

          Alexandru Averescu