2011年1月2日星期日

Create a new git repository for your iphone project

Here is how I create a repository for my iphone project.
  1. After create a project in xcode, open a terminal and go to the project directory
  2. type "git init", it should create an empty .git repository
  3. create a .gitignore file, the file has following contents
# xcode noise
build/*
*.pbxuser
*.mode1v3

# old skool
.svn

# osx noise
.DS_Store
profile
4. Create a .gitattributes file
*.pbxproj -crlf -diff -merge

5. type "git add ." to add all files in repository
6. type "git commit -m 'initail commit'" to commit all changes.


Now your repository is ready!

BTW: I should learn how to use this blog :(

reference: http://shanesbrain.net/2008/7/9/using-xcode-with-git

没有评论: