Reputation: 12132
I have some outstanding outgoing commits in Visual Studio using Visual Studio Online with Git. I want to push my local repository to my TFS account.
My problem is that the Push option is disabled.
I tried simply adding some comments to create a change and then locally committing that. That would be BaseLine Resend in the image below. I NO had problems with locally committing but the Push option enabled state did not change i.e. it's still disabled.
I would like to know how to recover from this state and it's happened several times before and the only solution seems to be to wipe the repository and start over which is obviously completely unsatisfactory.
Update: Git Config
[core] bare = false repositoryformatversion = 0 filemode = false logallrefupdates = true symlinks = false ignorecase = true [diff] tool = vsdiffmerge [difftool] prompt = true [difftool "vsdiffmerge"] cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio
12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t keepbackup = false trustexistcode = true [merge] tool = vsdiffmerge [mergetool] prompt = true [mergetool "vsdiffmerge"] cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio
12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m keepbackup = false trustexistcode = true [remote "origin"] url = https://abc.visualstudio.com/DefaultCollection/Abc%20Enterprise/_git/Abc.Enterprise.Tasking fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote
= origin merge = refs/heads/master
Upvotes: 3
Views: 7671
Reputation: 3870
If you need to push your local git for the first time you should run the following (after creating the TFS 2013 git repository):
git remote add origin
http://tfs:8080/tfs/...
git push -u origin --all
If you need to commit a specific branch. You should publish this branch. See http://msdn.microsoft.com/en-us/library/jj190809.aspx#publish Until you publish the branch the commits on the branch will stay in "Unpublished branches"
Upvotes: 3