0

This is rather weird because even before I made my first commit to the remote repository, I made sure that my gitignore was all set and ready. My gitignore for my Android project looks like this:

# 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

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log  

However, when I did
Right Click - Team - Remote - Push, everything got pushed to the remote repository. Which is strange.
What have I done wrong?

An SO User
  • 24,612
  • 35
  • 133
  • 221
  • How did you create `.gitignore`? Read [this answer](http://stackoverflow.com/a/11451916/1889459) and see if it helps. – Marius Jul 18 '14 at 07:46
  • 1
    .gitignore only controls which files show up as untracked when doing `git status` and the like. For files that are already tracked (added to git) it does nothing. – laalto Jul 18 '14 at 07:46
  • @Marius Notepad++ and then refreshed by Eclipse project by `f5` and then made the commit – An SO User Jul 18 '14 at 07:47
  • @laalto `even before I made my first commit`? :) – An SO User Jul 18 '14 at 07:48
  • Try restarting Eclipse and see if it helps. I noticed that on my laptop, Eclipse is caching stuff way too much, for example, if I create new xml file with LinearLayout, delete it, then create it again with same filename, but with RelativeLayout, the file created is the old deleted file with LinearLayout. – Marius Jul 18 '14 at 07:50
  • @Marius Yeah I have encountered that issue, too. Could it be an encoding issue? Change the encoding of gitignore to `ANSI`? How do I get rid of these unwanted files now that they are out there? – An SO User Jul 18 '14 at 07:51
  • @LittleChild that was suggested in link I provided earlier. – Marius Jul 18 '14 at 07:52
  • @Marius how about getting rid of the file? – An SO User Jul 18 '14 at 07:53

0 Answers0