Teun Kooijman
Teun Kooijman

Reputation: 1377

Git - Android Studio no longer lets me commit changes and push to GitHub

As of a couple of hours ago, Android Studio no longer lets me commit my changes. When the Commit dialog pops up, it shows the files that have changed and lets me enter a commit message. However, when i click Commit (or Commit and Push), the progress dialog comes up, goes to about 10% - 20% and then just disappears without actually committing anything. If i try again (without restarting the IDE first), nothing seems to happen at all when i click Commit/Commit and Push.

Sadly, Google searches have so far not been very helpful to me, so if any of you could help me out, i would really appreciate it.

I have heard, however, that git might sometimes clash with Windows on changing the capitalization of file names. I do remember renaming my Utilities package to utilities and Adapters package to adapters. Could this be causing my problem and if so, how can i fix this?

Thanks in advance.

Upvotes: 24

Views: 12111

Answers (4)

MGK
MGK

Reputation: 1

Perform code analysis can be turned it off in the Settings/Preferences dialog ⌘, go to Version Control | Commit

Upvotes: 0

I was suffering from same problem. Initially i unchecked "Perform code analysis" in commit changes dialog. but it didn't worked for me so kept it as unchecked and proceed with "Invalidate cache & restart" from studio setting then it worked for me.

Upvotes: 0

Teun Kooijman
Teun Kooijman

Reputation: 1377

As suggested by LaYer Sutachad, I attempted to Commit and Push with "Perform code analysis" unchecked in the Commit dialog. This, however, finally gave me a bunch of actual error messages in the form of:

Commit failed with error: pathspec 'f/Workspaces/AndroidStudio/ProjectName/app/src/main/java/com/ project/Utilities/PixelConverter.java' did not match any file(s) known to git.

After only a few Google Searches I found an answer to this problem provided by RacZo here. Which basically prompts to backup the problematic packages/files and re add them through Android Studio, adding them to Git in the process.

Thanks to LaYer Sutachad for pointing me in the right direction!

Upvotes: 7

LaYer Sutachad
LaYer Sutachad

Reputation: 969

I have the same problem. Try uncheck "Perform code analysis" in commit changes dialog. it worked for me.

Upvotes: 87

Related Questions