Answer the question
In order to leave comments, you need to log in
Can git push ignore errors?
Recently I just started learning Git and "version control" in general.
I develop and maintain a website. Previously, it was enough for me to develop all the time on a working server, but I decided to increase my knowledge and not touch the production server.
The repository has only two branches master and feature. On a working computer, I calmly developed new changes in the feature branch, after debugging I did a merge in master and pull on the production server, if anything was updated on the production server, then I did a push and everything went normally, everyday ... simple operations.
But a couple of days ago, the pradakshn server was completely reinstalled. The site was copied (backed up) along with the .git folder, after which the content management system core was updated, which required a push from the production server to the repository.
But then an error appeared:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:ххх/ххх.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
Answer the question
In order to leave comments, you need to log in
git push --force
This will overwrite changes on the server with local changes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question