I've got a 2 web servers, one testing and one live. Both have their codebases managed with git.
I develop on the testing server, then push the changes from a master branch on the testing server to the live server with git push
. However, at the moment I then have to log in to the live server and run git reset --hard
for the changes to be reflected in the live code.
The warning message git displays when I push suggests changing the setting of receive.denyCurrentBranch
to change how this push is handled. However, as I understand, I can either have it refuse the push, accept it with a warning and require a git reset
, or accept it with no warning and require a git reset
. Can I have it accept the push an not require the reset?
Thanks!