Git - error failed to push some refs to git resolve - Solved

By Hardik Savani November 5, 2023 Category : Git Bitbucket

I encountered this error while working on my PHP project and attempting to add it to my Bitbucket account. First, I created a repository on my Bitbucket account and cloned the repository. However, when I tried to push my project for the first time, I encountered the following error:

error failed to push some refs to

https://infotech@bitbucket.org/infotech/mycollege.git

I tried many solutions to solve the issue below, but I couldn't find a proper solution. Finally, I tried adding the file to Git using the following method:

git add -A

git commit -m "setup project"

git push origin master

....

And Solve my issue, you can try this if you solve your problem.

Tags :
Shares