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

shafia

Shafia Rahman Chowdhury

Posted on January 1, 2024

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.

💖 💪 🙅 🚩
shafia
Shafia Rahman Chowdhury

Posted on January 1, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related