Answer the question
In order to leave comments, you need to log in
Why can't I push changes to a github page?
Why can't I push changes to the github page? There is a project folder. At first I added ka as usual, everything was added. Now I have made changes to this project in this folder and added other pages and elements, I want to add their repository with the commands:
git add .
git commit -m 'add new pages'
git push Blog master
error: failed to push some refs to 'github.com:nikitasalnikov/Blog.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Answer the question
In order to leave comments, you need to log in
Have you tried reading the error? It's all there...
You need to do a git pull before a git push to get the changes you don't have locally.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question