0

I'd like to ignore specific java class from git. So I' posted inside root .gitignore file the full path of my desired class to ignore, but this class is still tracked by git.

app/src/main/java/com/my_pack/MyActivity.class

After updating .gitignore I run git -rm cached app/src/main/java/com/my_pack/* to exclude all content of /my_pack then git add . + push back but MyActivitypersist there.

Any advices are apreciated.

p.s. using github

1
  • Note that adding a file to .gitignore will not untrack an already tracked file. You should probably ignore all .class files with *.class. Commented Oct 16, 2018 at 14:51

1 Answer 1

0

Before git add . run git status and follow instruction for completely remove files.
For me it work.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.