12

No matter what I try, this menu item never seems to "enable":

enter image description here

What am I missing? This is in VS 2015 Update1 pointed at a Git repo on TFS 2015.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141
Keith Hill
  • 194,368
  • 42
  • 353
  • 369
  • Can you create a pull request from the web portal? It's under CODE > Pull Requests > Create new Pull Request – DaveShaw Jan 07 '16 at 21:38
  • Yes that works just fine. – Keith Hill Jan 07 '16 at 21:47
  • Must be a VS Issue then. Tried the usual turn it off and back on again? I take it the screen shot is from the Branches Page and that is a remote branch? Does this happen for all branches/users/etc, or just this one? – DaveShaw Jan 07 '16 at 21:49
  • Restarted VS and tried with another branch. I'm try to create the PR from the remote branch (after it has been published/pushed). The PR menu item is still disabled. I did upgrade to Git version 2.7.0.windows.1. Is it possible that could be causing this behavior? – Keith Hill Jan 07 '16 at 22:34
  • I wouldn't think so, I can't imagine it using and local Git stuff for that. – DaveShaw Jan 08 '16 at 00:04
  • What TFS update? That REST endpoint is relatively new (update 1?) – Edward Thomson Jan 08 '16 at 01:05
  • Looks like the server is running TFS 2015 update 1 (version 14.0.24712.0). – Keith Hill Jan 08 '16 at 06:07

3 Answers3

46

In my case my local git repository was not "associated" with TFS.

This post helped me discover the solution.

In Team Explorer go to "Manage Connections" -> "Connect to Team Project" which will open this window. From here check the team project that the git repository should be associated with.

enter image description here

After doing so the team project should now show up in the Team Explorer. Right click "Connect" on the newly added team project.

enter image description here

SkipHarris
  • 2,334
  • 1
  • 25
  • 31
  • 9
    This should be accepted answer. Reinstall _(fill-in-the-blank)_ should never be an answer. – dwp4ge May 20 '16 at 16:40
  • 3
    I absolutely, 100% agree that this should be the accepted answer. – andrewcbancroft Jun 07 '16 at 13:46
  • Good answer. In my case, I had not pushed the branch yet. Doh! FYI if someone else comes here and is still wondering why the "create pull request" menu item is grayed out. – Dan7el Dec 07 '20 at 16:25
0

In my case (coming from TFVC), it was because you cannot make pull requests from master to master. Pull requests are for individual branch development only.

Nathan Lafferty
  • 1,988
  • 1
  • 15
  • 17
-9

It all works fine with my VS 2015 Update1 and TFS2015 update1. Please try to delete your local repository and reconfigure it.

If it still doesn't work, reinstall the VS.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • I recreated the repo but I also added the server to the VS connections/server list. It wasn't there before. Now it is working. – Keith Hill Jan 08 '16 at 20:56
  • 1
    Have a look onto the post - deleting everything is not the best anwser. Your changes will get lost if your master only accepts merges by pull requests – Bjego Jun 07 '16 at 15:15
  • @KeithHill The answer below should be marked as the answer: https://stackoverflow.com/a/36657064/200824 – Bob Lokerse May 22 '18 at 14:36