tallaghi
tallaghi

Reputation: 345

Gitignore not ignoring certain project.properties

I am using the github app for windows and mac and I am having a problem with my .gitignore file.

I am trying to ignore the project.properties file that gets generated when switch between my two machines but I simply cannot seem to get it to work.

Below is a copy of my .gitignore, and it seems to be working well for everything except for the project.properties, as well as the gen/* that I have in there yet that is less annoying.

I have been researching this for a while and haven't found an answer, I would appreciate any help!

# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties
.properties

# Proguard folder generated by Eclipse
`enter code here`proguard/

#Log Files
*.log

project.properties
*.properties
project.properties

Upvotes: 18

Views: 29115

Answers (1)

Jeremy W
Jeremy W

Reputation: 809

I suspect you added the project.properties line to .gitignore after that file had been committed.

What you need to do is the following:

git rm --cached project.properties

and for gen/*

git rm --cached gen/

Then commit.

the --cached option will unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone. git-rm

Upvotes: 42

Related Questions