0

I have a project dir, and I git init the dir. Then I created a .gitignore file in the same dir, and copied these.gitignore rules

# OS generated files #
.DS_Store
# SVN control files #
.svn

and then I tried git add, and the console outputs:

add '.DS_Store'
add '.gitignore'
add '.svn/all-wcprops'
add '.svn/entries'

the .gitignore seems not working. Can someone help me?

Add:

a lot of similar questions says that, use "git rm -r --cached ." But i have never commit once, it just dont helpful!

As you wish, here is git status output:

by-01-0497:trunck appleofuestc$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   .DS_Store
#   .gitignore
#   .svn/
#   SiChuan-Mahjong/
nothing added to commit but untracked files present (use "git add" to track)
pinchwang
  • 353
  • 1
  • 2
  • 13
  • Can you run `git status` and add the output to your question please? – georgebrock Jul 04 '13 at 09:04
  • It sounds like you added .DS_Store to your .gitignore and *then* ran a git add '.DS_Store'. You should have then received the following error "The following paths are ignored by one of your .gitignore files" what version of git are you running? – spuder Jul 05 '13 at 08:17
  • preinstalled git in 10.8.4, version 1.7.12.4 – pinchwang Jul 08 '13 at 09:39

1 Answers1

1

You should keep the .gitignore in the same folder as your .git folder. Or you can check this.

Community
  • 1
  • 1
kode cooper
  • 13
  • 1
  • 4