Git Giving “fetch first” error when trying to push

23

I have been taken same error, then I solved this topic with used “–force” command. Briefly, write this command;

git push origin master --force

Attention: Probably, you tried to do push your codes over and over again before , that’s why you took this error.My solution overwrite forcefully with your changeset. By this method your repository may cause mismatch other people’s. But If you work alone (not like a group working), so you can use easily “–force” as I mentioned above.

Leave a Comment