Thursday, February 5, 2015

How to solve Visual Studio git push problem "You cannot publish local branch master to the remote repository origin"?

Error happened:
When I created a local git repository and tried to push to remote repository, got following error:

"You cannot publish local branch master to the remote repository origin because a branch with the same name already exists there. You might want to rename your local branch and try again"

Solution:
- Install 3rd party git tool
- Add remote repository in GitUI
- Click push, and select "remote repository"