4

一段时间以来,我一直在为 Android 开发使用带有 git 集成的 Intellij IDEA。我最近升级到了 Android Studio (v0.1.1),现在我最喜欢的快捷键 Ctrl+Command+A“添加到 VCS”总是被禁用。这是我缺少的错误还是 GIT 设置?

截屏

4

5 回答 5

3

我有同样的问题。首先初始化 git 并添加文件以进行跟踪,一些文件要求添加到 git。当您忽略它并选中“不要询问/记住”时,它们会添加到 .gitignore文件中。

只需打开.gitignore文件并检查是否包含特定文件夹,然后将其删除,文件夹和文件的灰色将变为红色,您可以简单地添加它们。

希望对你有用

于 2016-12-18T19:01:47.980 回答
0

将文件添加到 git 意味着,该文件以前在 git 中不存在并且是新创建的……如果您更改文件,请使用提交;)

于 2013-08-09T11:15:59.547 回答
0

I know I am late to the party, but this solved my problem.

Please note, that Android Studio also has its own Ignored Files list. If you can commit files with other git clients or using git in terminal, this could be the problem. In Android Studio go to File > Settings > Version Control > Ignored Files and remove files/folders from the list. Now you should be able to add files to git.

于 2019-04-27T10:33:59.330 回答
0

这个问题是3 年前提出的,可能 OP 甚至不再关注这篇文章来寻求答案。但是,对于那些登陆此页面寻求答案的人。-从那时起,Android Studio 已经发展了很多,所有这些问题都得到了修复。继续下载今天的最新版本。它在我的最后工作正常。从未见过这种情况发生。

于 2016-04-27T08:14:38.480 回答
-1

您可以通过此菜单启用它:

菜单图片

于 2016-04-27T06:05:42.173 回答