Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio not showing Git commit options in context menu

I have an existing Bitbucket Git project and I have installed Visual Studio Tools for Git from here

My visual studio didn't show any thing at all to signify I'd done this until I went into tools>options>source control and changed it from none to "Microsoft Git provider"

Now my solution explorer shows little padlocks and ticks in the right places but when I right-click there is nothing at all to do with commiting or anything to git

When I create a new project I don't have the option to create a new git repository either.

I am using Visual Studio 2012 and have tried installing all updates and repairing the tool but still no joy.

Does anyone know what's happened?

like image 962
Bex Avatar asked Oct 21 '14 12:10

Bex


4 Answers

I had the same issue, and I get the context menu in some directories and not others. I was able to check-in using the technique below, but I also would like to get the context menu for "Commit" and "Add".

Try going to "Team Explorer" tab, then under "Project" click the "Changes" icon. enter image description here

That should list all the files you have added (highlighted in yellow below). Enter a commit message then "Commit" or "Commit all".

Update: A few minutes later in Solution Explorer, I now see the Commit/Undo options. Seemed to be a delay before they appeared.

enter image description here

like image 178
NealWalters Avatar answered Oct 20 '22 18:10

NealWalters


There's a shortcut to git "commit" on the Visual Studio status bar near the branch control. It shows you how many changes there are to commit too.

enter image description here

like image 36
Matthew Avatar answered Oct 20 '22 17:10

Matthew


I believe you have to clone your repository from GitHub in order to get the commit context options. I had this same issue and had to use the GitHub desktop app to commit changes or use Team Explorer is VS. I committed everything I had, deleted everything I had locally and then cloned it from GitHub. I now have the commit option available via the context menu.

EDIT: I have also noticed that if you have the "Show all files" button selected in VS the commit context disappears. If you de-select show all files, you are able to access commit again.

like image 22
dvanderl Avatar answered Oct 20 '22 17:10

dvanderl


I have the same issue here. Sometimes it is displayed sometimes it is not. Now I am using TortoiseGit with TortoiseGitToolbar visual studio extension. It provides a great toolbar and also you can pull/commit changes outside the solution directory.

https://github.com/MRCollective/TortoiseGitToolbar

like image 40
Cagatay Kalan Avatar answered Oct 20 '22 17:10

Cagatay Kalan