Skip to content

Instantly share code, notes, and snippets.

@Superbil
Created September 25, 2010 11:40
Show Gist options
  • Save Superbil/596761 to your computer and use it in GitHub Desktop.
Save Superbil/596761 to your computer and use it in GitHub Desktop.
auto make xcode ignore file script
#!/bin/bash
## call git init
git init
## make .gitignore
cat > .gitignore << EOF
# Mac OS X Finder and whatnot
.DS_Store
# no useful files
log/*.log
tmp/**/*
public/cache/**/*
doc/api
doc/app
# xcode noise
build/
*.[oa]
*.pbxuser
*.perspective
*.perspectivev3
*.mode1
*.mode1v3
*.mode2v3
# Other source repository archive directories (protects when importing)
.hg
.svn
CVS
# automatic backup files
*~.nib
*.swp
*~
*(Autosaved).rtfd/
Backup[ ]of[ ]*.pages/
Backup[ ]of[ ]*.key/
Backup[ ]of[ ]*.numbers/
# Sparkle distribution Private Key (Don't check me in!)
dsa_priv.pem
EOF
## make .gitattributes
cat > .gitattributes << EOF
*.pbxproj -crlf -diff -merge
EOF
## add .gitignore and gitattributes to git list
git add .gitignore
git add .gitattributes
## add git commit
git commit -m "Git Init for Xcode!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment