Posted on

Error publishing Visual Studio Solution on GitHub

On VS 2013 and VS 2015, you should have this error, publishing, first time, your solution on GitHub Repository :

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.

VS 2013/2015 will initialize the GIT repository when your first commit with sync. So, simple solution is to delete the GIT repository (how to delete) and recreate it without initialize option.