Git - error failed to push some refs to git resolve - Solved
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.
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Remove File from Git Commit Before Push?
- How to Delete a Branch form GitHub Repository?
- How to Rename Branch Name in Git Command?
- How to Switch Branch using Git Command?
- How to Create a New Branch on GitHub?
- How to Clone Github Repository using Command Line?
- How to Ignore Wildcard Files Name in Git using Gitignore?
- How to Ignore Folder in Git using Gitignore?
- How to Ignore File in Git using Gitignore?
- Git - How to Find a Deleted File in Commit History?
- How to Configure Git Username and Email?
- How to Git Force Pull from Remote Branch?
- Git Remove Last Commit from Local Example