I have .gitignore
d .DS_Store
and .gitignore
files. But still see them in the "git status".
Can someone explain to me how I can make sure that the files that I am trying to ignore don't show up while checking status?
git status
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .DS_Store
# .gitignore
I have the .DS_Store
file in all the subfolders of my repository. So I want all of those to be ignored. What should I do?
I have configured .gitignore
file in the root directory of my repository.
Should I copy this to all the subfolders for git to ignore these files?
Is adding .gitignore
in .gitignore
file not acceptable?
EDIT: Jan 21st 2014 ==================
I still can't figure this out. The comments below didn't really help me. So I am reposting my query.
Below is a snippet of my git status
output. The actually output spans couple of pages. And all the files in this output are files/folders I don't want in my repo. These are untracked files so I have never git add
ed them. But when I create a new project, I have to search for the related files/folders in this huge list before adding them, which is making the whole process a bit irritating.
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../../.DS_Store
# ../../Classes/
# ../.DS_Store
# ../Basics/.DS_Store
# ../adt/.metadata/
# ../adt/Fundamentals/.classpath
# ../adt/Fundamentals/.project
# ../adt/Fundamentals/.settings/
# ../adt/Fundamentals/bin/
# .DS_Store
# .metadata/
Below is my .gitignore
file. Can someone please point out my mistake?
*.class
*.pyc
colors
**/.DS_Store
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
#Eclipse files
.project
# folders
.classpath/
.settings/
.metadata/
WEB-INF/lib/
META-INF/
Servers/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/