0

I am working on an android project through Github. Now, when I pull any commit and do any unwanted changes in working directory, I use git checkout . to revert back. This works fine with all other files but shows R.java still as modified. How to revert R.java file also? I am using PowerShell Git in Windows8.

4

2 回答 2

2

R.java是自动生成的,不应检查到 VCS。您必须.gitignore将以下行添加到文件中,以防止将生成的文件添加到源代码管理中:

# Generated files
bin/
gen/
于 2014-04-14T10:41:50.060 回答
0

覆盖当前目录的 .gitignore 文件中可能包含 *.java 排除项。如果从 .gitignore 中删除这些定义,则可以包含这些文件

于 2014-04-13T21:30:29.283 回答