Question

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.

Was it helpful?

Solution

R.java is automatically generated and shouldn't be checked into VCS. You have to add the following lines to your .gitignore file to prevent generated files to be added to the source control:

# Generated files
bin/
gen/

OTHER TIPS

The .gitignore file that covers the current directory may have a *.java exclusion in it. You can include these files if you remove these definitions from .gitignore

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top