DEV Community

Cover image for Error: (e.g git pull..) before pushing again
Shafia Rahman Chowdhury
Shafia Rahman Chowdhury

Posted on

Error: (e.g git pull..) before pushing again

The error below takes place when you edit your file directly from github as a result code in local file and file github file does not match.

Image description
Go to your terminal again and run these commands

Solution-1

git pull
git push origin main
Enter fullscreen mode Exit fullscreen mode

Solution-2 (not recommended)

git push -f
Enter fullscreen mode Exit fullscreen mode

By following these steps, you should be able to synchronize your local changes with the changes on GitHub and avoid conflicts.

Top comments (0)