gitlab: history of commits are available after merge request











up vote
1
down vote

favorite












I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?



I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.










share|improve this question


























    up vote
    1
    down vote

    favorite












    I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?



    I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?



      I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.










      share|improve this question













      I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?



      I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.







      git version-control gitlab






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 16:31









      VSB

      3,87653679




      3,87653679
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Yes, if you push your branch, all the history will be there. You can either



          #1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this



          or



          #2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
          Gitlab Squash



          See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.



          Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.






          share|improve this answer




























            up vote
            1
            down vote













            Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i or git merge --squash for that. I like to do it by hand this way... say it's 10 commits you want to squash:



            git reset --soft HEAD~10
            git commit -m "blah blah"


            Voila! There you have a squashed commit.






            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%2f53229698%2fgitlab-history-of-commits-are-available-after-merge-request%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








              up vote
              1
              down vote



              accepted










              Yes, if you push your branch, all the history will be there. You can either



              #1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this



              or



              #2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
              Gitlab Squash



              See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.



              Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.






              share|improve this answer

























                up vote
                1
                down vote



                accepted










                Yes, if you push your branch, all the history will be there. You can either



                #1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this



                or



                #2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
                Gitlab Squash



                See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.



                Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.






                share|improve this answer























                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  Yes, if you push your branch, all the history will be there. You can either



                  #1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this



                  or



                  #2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
                  Gitlab Squash



                  See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.



                  Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.






                  share|improve this answer












                  Yes, if you push your branch, all the history will be there. You can either



                  #1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this



                  or



                  #2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
                  Gitlab Squash



                  See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.



                  Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 10 at 15:42









                  mles

                  1,68242958




                  1,68242958
























                      up vote
                      1
                      down vote













                      Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i or git merge --squash for that. I like to do it by hand this way... say it's 10 commits you want to squash:



                      git reset --soft HEAD~10
                      git commit -m "blah blah"


                      Voila! There you have a squashed commit.






                      share|improve this answer

























                        up vote
                        1
                        down vote













                        Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i or git merge --squash for that. I like to do it by hand this way... say it's 10 commits you want to squash:



                        git reset --soft HEAD~10
                        git commit -m "blah blah"


                        Voila! There you have a squashed commit.






                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i or git merge --squash for that. I like to do it by hand this way... say it's 10 commits you want to squash:



                          git reset --soft HEAD~10
                          git commit -m "blah blah"


                          Voila! There you have a squashed commit.






                          share|improve this answer












                          Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i or git merge --squash for that. I like to do it by hand this way... say it's 10 commits you want to squash:



                          git reset --soft HEAD~10
                          git commit -m "blah blah"


                          Voila! There you have a squashed commit.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 9 at 16:45









                          eftshift0

                          4,064817




                          4,064817






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53229698%2fgitlab-history-of-commits-are-available-after-merge-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

                              Full-time equivalent

                              Bicuculline

                              さくらももこ