When i want to push github throw thi error


When i want to push github throw thi error


PS D:\projects\assignment-11> git commit -m"fake data removed"
[main d671435] fake data removed
 9 files changed, 80 insertions(+), 71 deletions(-)
 create mode 100644 src/media/no-item.png
 ! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'https://github.com/ProgrammingHeroWC4/warehouse-management-client-side-ifty03.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.


The message says what you have to do. git pull, merge changes, then git push

Answered By – andrea m.

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published