xCode中为已存在项目添加git版本控制 1.调出终端,cd到项目位置,如cd Documents/xxx 2.git init 3.git add . (千万不要少打.号) 4.git commit -m "Initial commit"