Share & learn

Through Innovative Digital Library

error: failed to push some refs to 'root@git-master:

We are getting below error while trying to push changes to remote repo after. Can someone please assist over this.
 



Answers

Posted by rocky on April 5th 2018 21:54 PM

Following configuration can be applied either on .git/config file or global config file /etc/gitconfig on the repo server. This will allow you to push with branch warning. Such patterns to "deploy" code is not advisable if you make changes in the working copy that you're pushing to, however, this can be the best approach for faster code deployment. After Git push, run checkout command on remote machine to reflect the changes in the working copy of the remote machine. # git checkout -f

cat /etc/gitconfig

[receive]
denyCurrentBranch false

-----------------------------

# git checkout -f

Posted by Robert on April 5th 2018 21:55 PM

can can also use change the repository while it's a working copy.

git config receive.denyCurrentBranch ignore
Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character
OUMC

related questions

Most liked questions

Most answered questions

Login
OUMC Refresh
Register
OUMC Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Reply
Minimum 20 character
OUMC Refresh