Updated guide to gitignore in Android studio. To untrack every file that is now in your .gitignore
- Commit all changes to our code (the .java files)
- run git rm -r --cached . to remove any changed files from the index(staging area)
- run git add .
- Commit it, run git commit -m “commit message”
- Done
Note:
- don’t forget to add dot “.” at the end of the command to indicate all files.
- the correct git ignore filename is “.gitignore” (with dot at the beginning of the filename)
Example of working .gitignore file :
.idea/
.gradle/
*.iml
*.class
build/
local.properties
app/app.iml
ipekinjector/ipekinjector.iml
merchantapp/merchantapp.iml
zBarScannerLibrary/zBarScannerLibrary.iml
cashlezmpos/cashlezmpos.iml
For reference:
For java project I think all you need is add *.class in the gitignore file
No comments:
Post a Comment