Thursday, February 4, 2016

Lesson 61: git ignore all non .java files

Updated guide to gitignore in Android studio. To untrack every file that is now in your .gitignore
  1. Commit all changes to our code (the .java files)
  2. run git rm -r --cached . to remove any changed files from the index(staging area)
  3. run git add .
  4. Commit it, run git commit -m “commit message”
  5. 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