Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 Tools for GIT - cannot publish an unpublished branch

I am attempting to use an existing GIT setup within VS2013 using Tools for Git extension.

I believe the repositories and remotes are setup correctly because I can do what I need to using GitShell -- this has not presented any difficulties.

I have a local repository and inside of Team Explorer the master branch is shown as an Unpublished Branch. When I right-click and choose Publish Branch a progress bar is displayed briefly and then the message:

Successfully published branch master to .

(please note the period '.' at the end)

But the branch remains in the Unpublished Branch section. Repeated attempts produce the same non-result.

enter image description here

What is wrong here? What can do I break out of this catch-22?

like image 913
David Tansey Avatar asked Apr 12 '14 21:04

David Tansey


1 Answers

This problem was the result of a incorrect / partial Git configuration.

In my Git configuration file, the remote definition for origin did not have any fetch entry.

[remote "origin"]
    url = http://DM-BUILD/git/StarSchemaMetadata.git

[branch "master"]
    remote = origin
    merge = refs/heads/master

With the fetch entry was added as shown here:

[remote "origin"]
    url = http://DM-BUILD/git/StarSchemaMetadata.git
    fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
    remote = origin
    merge = refs/heads/master

The configuration problem has been corrected and now I can successfully Publish an Unpublished Branch using VS Tools for Git extension.

like image 65
David Tansey Avatar answered Oct 18 '22 16:10

David Tansey