用习惯了Xcode再用别的IDE确实很不习惯呐,command的各种快捷键也顺手了,ctrl用不惯~~~~(>_<)~~~~
说正题,安装git后,Xcode新建项目中可以选择使用Source Control
于是之后每个文件都能单独进行Commit等操作,当然整个项目,包括配置文件都可以。
然后就是更改文件名后提交报错:
fatal: Will not add file alias already exists in index XXXXXX
我试过即使新建一个分支也无法解决这个问题,又不忍心重新建立一个项目..不过好在实际上有个很简单的解决办法:
将更名的文件 如 foo更名为Foo,先更名为foo2然后提交,然后再更名为Foo再提交即可
这是由于git文件系统在MacOS下也不区分大小写(分区的时候可以选择区分大小写,没有试过是否也能解决这个问题,当然更不会因为这个重新分区…

Git in Xcode
You can try:
1. “git mv -f foo.txt Foo.txt”
2. set `ignorecase’ to false in the config file
See also:
http://www.paperplanes.de/2008/9/24/git_bits_renaming_with_lowercase.html
http://www.patrick-wied.at/blog/rename-files-and-folders-with-git
好方法…
And you can try GNU Bazaar, in bzr:
Renames are properly tracked.
Directories are first class objects. Directory renames are tracked, not just file renames.
See also:
http://doc.bazaar.canonical.com/migration/en/data-migration/index.html
The situation of Bazaar seems bad now.
这样也可以:
mv ‹file old name› ‹file new name›
git rm ‹file old name›
git add ‹file new name›
Apart from the book I gave you, these resources are also very useful:
http://eagain.net/articles/git-for-computer-scientists/
http://www-cs-students.stanford.edu/~blynn/gitmagic/
http://jonas.nitro.dk/git/quick-reference.html
progit.org/book/
https://git.wiki.kernel.org/index.php/Main_Page
http://gitref.org/
https://www.kernel.org/pub/software/scm/git/docs/
And, of course, the official site:
http://git-scm.com/
And the Git Community Book:
http://book.git-scm.com/
As for Xcode, I’m not interested in it.Apart from the book I gave you, these resources are also very useful:
http://eagain.net/articles/git-for-computer-scientists/
http://www-cs-students.stanford.edu/~blynn/gitmagic/
http://jonas.nitro.dk/git/quick-reference.html
progit.org/book/
https://git.wiki.kernel.org/index.php/Main_Page
http://gitref.org/
https://www.kernel.org/pub/software/scm/git/docs/
And, of course, the official site:
http://git-scm.com/
And the Git Community Book:
http://book.git-scm.com/
As for Xcode, I’m not interested in it.