Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git not ignoring certain Xcode files in .gitignore

Tags:

git

xcode

I am new to Git and I am using it to backup an iPhone project I am working on. I have added a list of files that Git should ignore (xcode files) when I update, but this .perspectivev3 (which is in my .gitignore) file keeps showing up when I go to commit my changes. Does anyone know why this is, or what I am doing wrong?

Thanks,

Zach

This is what is in my .gitignore file:

# xcode noise
*.mode1v3
*.pbxuser
*.perspective 
*.perspectivev3
*.pyc 
*~.nib/
build/*

# Textmate - if you build your xcode projects with it
*.tm_build_errors

# old skool
.svn

# osx noise
.DS_Store
profile
like image 410
ab217 Avatar asked Jul 21 '10 06:07

ab217


1 Answers

If it keep showing up in the git status, it must have been added or committed before.

You need to

  • git rm --cached that file, in order for the git status to not list it anymore (it is was just added, but not committed yet).
  • git rm that file, if it was previously committed (see this question for instance)
like image 85
VonC Avatar answered Sep 25 '22 18:09

VonC