On push, I receive a “overwritten by merge” error. I believe it is caused by a post-update hook. Can I bypass?Git workflow and rebase vs merge questionsUndo a particular commit in Git that's been pushed to remote reposmoving committed (but not pushed) changes to a new branch after pullHow do I properly force a Git push?What exactly does the “u” do? “git push -u origin master” vs “git push origin master”How can I reconcile detached HEAD with master/origin?Git push rejected after feature branch rebaseHow do I resolve git saying “Commit your changes or stash them before you can merge”?Various ways to remove local Git changesThere is no tracking information for the current branch

Does battery condition have anything to do with macbook pro performance?

How to count the number of function evaluations in NIntegrate

I have a private key file and I want to encrypt

How should errors be reported in scientific libraries?

Floating Point XOR

Tips for remembering the order of parameters for ln?

What is the maximum viable speed for a projectile within earth's atmosphere?

What is the expected way to acquire costly material components?

Minimize taxes now that I earn more

What do solvers like Gurobi and CPLEX do when they run into hard instances of MIP

Escape the labyrinth!

I reverse the source code, you negate the input!

Do the villains know Batman has no superpowers?

Who are the people reviewing far more papers than they're submitting for review?

Is there any reason nowadays to use a neon indicator lamp instead of a LED?

Why can't we use uninitialized local variable to access static content of its type?

Are lay articles good enough to be the main source of information for PhD research?

Applications of mathematics in clinical setting

Are the cores of every mountain range igneous?

Is it possible that the shadow of The Moon is a single dot during solar eclipse?

Why do we need to use transistors when building an OR gate?

Debussy as term for bathroom?

Make Interviewee Comfortable in Potentially Intimate Environment

I feel like most of my characters are the same, what can I do?



On push, I receive a “overwritten by merge” error. I believe it is caused by a post-update hook. Can I bypass?


Git workflow and rebase vs merge questionsUndo a particular commit in Git that's been pushed to remote reposmoving committed (but not pushed) changes to a new branch after pullHow do I properly force a Git push?What exactly does the “u” do? “git push -u origin master” vs “git push origin master”How can I reconcile detached HEAD with master/origin?Git push rejected after feature branch rebaseHow do I resolve git saying “Commit your changes or stash them before you can merge”?Various ways to remove local Git changesThere is no tracking information for the current branch






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have a certain file, filename.html, that I've made some changes to and I'd like to push the commit. So I've made changes, added and committed them. Whenever I push, I get the following output:




Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 439 bytes | 439.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote:
remote: **** Pulling changes into Live [Hub's post-update hook]
remote:
remote: From /var/git/html
remote: * branch master -> FETCH_HEAD
remote: error: Your local changes to the following files would be overwritten by merge:
remote: filename.html
remote: Please, commit your changes or stash them before you can merge.
remote: Aborting
remote: Updating c987b05..583872c
To website.com:/var/git/html.git
76ad8aa..583872c master -> master



I've tried to git reset --hard and I've tried to force a push. I tried git push origin master --no-verify. I've tried to stash the changes. No success.



To be clear, I can make changes and push commits just fine for all other files in the project. It is just this one particular file that, if I make and commit changes to, won't let me push.



From another question I've asked here, I've been told that it's probably the post-update hook that is causing a pull and this is where the error arises. However, I haven't been able to find a way around it. I didn't set up the git on this project, and the developer that did has since left the company. The git is set up in a way that, when pushed, the changes are pushed via ftp to update the dev site.



Is there a way to bypass this hook so I can push? Is there a better fix to this problem I'm not aware of?



Thanks in advance, this one has me stumped.










share|improve this question






























    1















    I have a certain file, filename.html, that I've made some changes to and I'd like to push the commit. So I've made changes, added and committed them. Whenever I push, I get the following output:




    Enumerating objects: 9, done.
    Counting objects: 100% (9/9), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (5/5), done.
    Writing objects: 100% (5/5), 439 bytes | 439.00 KiB/s, done.
    Total 5 (delta 4), reused 0 (delta 0)
    remote:
    remote: **** Pulling changes into Live [Hub's post-update hook]
    remote:
    remote: From /var/git/html
    remote: * branch master -> FETCH_HEAD
    remote: error: Your local changes to the following files would be overwritten by merge:
    remote: filename.html
    remote: Please, commit your changes or stash them before you can merge.
    remote: Aborting
    remote: Updating c987b05..583872c
    To website.com:/var/git/html.git
    76ad8aa..583872c master -> master



    I've tried to git reset --hard and I've tried to force a push. I tried git push origin master --no-verify. I've tried to stash the changes. No success.



    To be clear, I can make changes and push commits just fine for all other files in the project. It is just this one particular file that, if I make and commit changes to, won't let me push.



    From another question I've asked here, I've been told that it's probably the post-update hook that is causing a pull and this is where the error arises. However, I haven't been able to find a way around it. I didn't set up the git on this project, and the developer that did has since left the company. The git is set up in a way that, when pushed, the changes are pushed via ftp to update the dev site.



    Is there a way to bypass this hook so I can push? Is there a better fix to this problem I'm not aware of?



    Thanks in advance, this one has me stumped.










    share|improve this question


























      1












      1








      1








      I have a certain file, filename.html, that I've made some changes to and I'd like to push the commit. So I've made changes, added and committed them. Whenever I push, I get the following output:




      Enumerating objects: 9, done.
      Counting objects: 100% (9/9), done.
      Delta compression using up to 4 threads
      Compressing objects: 100% (5/5), done.
      Writing objects: 100% (5/5), 439 bytes | 439.00 KiB/s, done.
      Total 5 (delta 4), reused 0 (delta 0)
      remote:
      remote: **** Pulling changes into Live [Hub's post-update hook]
      remote:
      remote: From /var/git/html
      remote: * branch master -> FETCH_HEAD
      remote: error: Your local changes to the following files would be overwritten by merge:
      remote: filename.html
      remote: Please, commit your changes or stash them before you can merge.
      remote: Aborting
      remote: Updating c987b05..583872c
      To website.com:/var/git/html.git
      76ad8aa..583872c master -> master



      I've tried to git reset --hard and I've tried to force a push. I tried git push origin master --no-verify. I've tried to stash the changes. No success.



      To be clear, I can make changes and push commits just fine for all other files in the project. It is just this one particular file that, if I make and commit changes to, won't let me push.



      From another question I've asked here, I've been told that it's probably the post-update hook that is causing a pull and this is where the error arises. However, I haven't been able to find a way around it. I didn't set up the git on this project, and the developer that did has since left the company. The git is set up in a way that, when pushed, the changes are pushed via ftp to update the dev site.



      Is there a way to bypass this hook so I can push? Is there a better fix to this problem I'm not aware of?



      Thanks in advance, this one has me stumped.










      share|improve this question














      I have a certain file, filename.html, that I've made some changes to and I'd like to push the commit. So I've made changes, added and committed them. Whenever I push, I get the following output:




      Enumerating objects: 9, done.
      Counting objects: 100% (9/9), done.
      Delta compression using up to 4 threads
      Compressing objects: 100% (5/5), done.
      Writing objects: 100% (5/5), 439 bytes | 439.00 KiB/s, done.
      Total 5 (delta 4), reused 0 (delta 0)
      remote:
      remote: **** Pulling changes into Live [Hub's post-update hook]
      remote:
      remote: From /var/git/html
      remote: * branch master -> FETCH_HEAD
      remote: error: Your local changes to the following files would be overwritten by merge:
      remote: filename.html
      remote: Please, commit your changes or stash them before you can merge.
      remote: Aborting
      remote: Updating c987b05..583872c
      To website.com:/var/git/html.git
      76ad8aa..583872c master -> master



      I've tried to git reset --hard and I've tried to force a push. I tried git push origin master --no-verify. I've tried to stash the changes. No success.



      To be clear, I can make changes and push commits just fine for all other files in the project. It is just this one particular file that, if I make and commit changes to, won't let me push.



      From another question I've asked here, I've been told that it's probably the post-update hook that is causing a pull and this is where the error arises. However, I haven't been able to find a way around it. I didn't set up the git on this project, and the developer that did has since left the company. The git is set up in a way that, when pushed, the changes are pushed via ftp to update the dev site.



      Is there a way to bypass this hook so I can push? Is there a better fix to this problem I'm not aware of?



      Thanks in advance, this one has me stumped.







      git gitlab githooks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 13:55









      Jacob BryantJacob Bryant

      284 bronze badges




      284 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1
















          Alright so after a lot of research and trial and error I finally fixed it. Essentially the git was set up to update a dev site when you do a git push. This system is basically set up along the same lines as the one described here



          So what I did is I replaced the original post update hook, which is the one described in the linked article, with this:



          #!/bin/sh
          echo
          echo "**** Pulling changes into Live [Hub's post-update hook]"
          echo
          cd /var/www/html || exit
          unset GIT_DIR
          git fetch --all
          git reset --hard hub/master
          git pull hub master
          exec git-update-server-info



          After this I was finally able to get past the error outlined in the original post, and now everything is running smoothly again.






          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/4.0/"u003ecc by-sa 4.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%2f55399383%2fon-push-i-receive-a-overwritten-by-merge-error-i-believe-it-is-caused-by-a-p%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









            1
















            Alright so after a lot of research and trial and error I finally fixed it. Essentially the git was set up to update a dev site when you do a git push. This system is basically set up along the same lines as the one described here



            So what I did is I replaced the original post update hook, which is the one described in the linked article, with this:



            #!/bin/sh
            echo
            echo "**** Pulling changes into Live [Hub's post-update hook]"
            echo
            cd /var/www/html || exit
            unset GIT_DIR
            git fetch --all
            git reset --hard hub/master
            git pull hub master
            exec git-update-server-info



            After this I was finally able to get past the error outlined in the original post, and now everything is running smoothly again.






            share|improve this answer





























              1
















              Alright so after a lot of research and trial and error I finally fixed it. Essentially the git was set up to update a dev site when you do a git push. This system is basically set up along the same lines as the one described here



              So what I did is I replaced the original post update hook, which is the one described in the linked article, with this:



              #!/bin/sh
              echo
              echo "**** Pulling changes into Live [Hub's post-update hook]"
              echo
              cd /var/www/html || exit
              unset GIT_DIR
              git fetch --all
              git reset --hard hub/master
              git pull hub master
              exec git-update-server-info



              After this I was finally able to get past the error outlined in the original post, and now everything is running smoothly again.






              share|improve this answer



























                1














                1










                1









                Alright so after a lot of research and trial and error I finally fixed it. Essentially the git was set up to update a dev site when you do a git push. This system is basically set up along the same lines as the one described here



                So what I did is I replaced the original post update hook, which is the one described in the linked article, with this:



                #!/bin/sh
                echo
                echo "**** Pulling changes into Live [Hub's post-update hook]"
                echo
                cd /var/www/html || exit
                unset GIT_DIR
                git fetch --all
                git reset --hard hub/master
                git pull hub master
                exec git-update-server-info



                After this I was finally able to get past the error outlined in the original post, and now everything is running smoothly again.






                share|improve this answer













                Alright so after a lot of research and trial and error I finally fixed it. Essentially the git was set up to update a dev site when you do a git push. This system is basically set up along the same lines as the one described here



                So what I did is I replaced the original post update hook, which is the one described in the linked article, with this:



                #!/bin/sh
                echo
                echo "**** Pulling changes into Live [Hub's post-update hook]"
                echo
                cd /var/www/html || exit
                unset GIT_DIR
                git fetch --all
                git reset --hard hub/master
                git pull hub master
                exec git-update-server-info



                After this I was finally able to get past the error outlined in the original post, and now everything is running smoothly again.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 1 at 19:14









                Jacob BryantJacob Bryant

                284 bronze badges




                284 bronze badges



















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















                    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%2f55399383%2fon-push-i-receive-a-overwritten-by-merge-error-i-believe-it-is-caused-by-a-p%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현