Commit all is greyed out in Team Explorer in VS 2015
Asked Answered
K

5

14

I created a project CmsShoppingCart in MS VS 2015 and created a local repository. But when I want to add commit for the first time, I found the Commit All button is greyed out all showed in the pictures below.

Is any suggestion to such an issue? Thank you very much. Also, this is the first time I am using Team Explorer.

Setting for local repository: Setting for local repository

Commit All button greyed out: Commit All button greyed out

Kenleigh answered 16/4, 2018 at 19:35 Comment(4)
what do you see when you click on the "Actions" dropdown menu?Ameeameer
It showed Open In File Explorer; Open Command Prompt; View History...Others are greyed out. In fact I found the problem already, I need to make a change on project files before the commit button works. Thanks for your response.Kenleigh
Amy, what was the problem and what change did you have to make?Hearne
March 2023 - I ran to into issue and tried few answers given below, but it didn't work. I restarted VS and the commit button was enabled again.Annamarieannamese
K
5

I found in my situation that I need to make a change on the project files before the commit button works.

Kenleigh answered 16/4, 2018 at 19:51 Comment(1)
I will accept it tomorrow for it shows "You can accept your own answer tomorrow".Kenleigh
C
34

In my case (Visual Studio 2022) it was all I needed to correct my email address in menu > Git > Settings > Git Repository Settings > Email same as in menu > Settings > Git Global Settings and the problem was resolved.

enter image description here

Craze answered 16/4, 2018 at 19:35 Comment(2)
You have to restart Visual Studio after fix.Cake
It also had the incorrect default location value. Setting it to the right project folder resolved for me (after restarting VS).Bohn
C
14

In my case i had to run Run

git config --global user.email "[email protected]" and git config --global user.name "My Name"

Crittenden answered 11/9, 2021 at 21:30 Comment(1)
I logged in just to upvote. This worked for me, despite the fact that looking at all of the settings in VS 2022 showed the correct values. I ran these git commands, closed and re-opened VS and Commit was re-enabled. Thanks!Grunberg
K
5

I found in my situation that I need to make a change on the project files before the commit button works.

Kenleigh answered 16/4, 2018 at 19:51 Comment(1)
I will accept it tomorrow for it shows "You can accept your own answer tomorrow".Kenleigh
G
2

For me, the same happened in the Git window in Visual Studio 2022. I was logged in to Visual Studio with a different account than the Git repository. I solved it by changing the email in the global Git settings to the email for the Git account without signing in with that email in Visual Studio. If that doesn't work, you can try signing in to Visual Studio with the email account associated with the Git repository.

Gaytan answered 27/9, 2022 at 9:38 Comment(0)
A
0

VS2022, had to add a WorkItem number, for example any number using a #-sign like #1. The Commit button got activated and stages committed and pushed. Maybe this answer helps others just as a reminder.

Adorno answered 22/8 at 16:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.