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;
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
add a comment
|
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
add a comment
|
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
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
git gitlab githooks
asked Mar 28 at 13:55
Jacob BryantJacob Bryant
284 bronze badges
284 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
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.
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment
|
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.
add a comment
|
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.
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.
answered Apr 1 at 19:14
Jacob BryantJacob Bryant
284 bronze badges
284 bronze badges
add a comment
|
add a comment
|
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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