我有一個Git倉庫,由於我自己的原因,我想在XCode 4之外進行管理。真的,我想要的是XCode只是讓我的倉庫保持獨立。但是,我注意到XCode會將新項目添加到存儲庫,如果它們保存在存儲庫中。如何阻止XCode 4修改本地Git存儲庫?
例如,假設我開始了一個純醇」回購:
mkdir gittest; cd gittest git init; touch a; git add a; git commit
我火了Xcode和創建一個新項目。注:我做而不是有「創建該項目的本地git存儲庫」複選框選中。對於目標目錄,我將它保存到目錄gittest
。
git status
顯示:
# On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # new file: gittest/gittest.xcodeproj/project.pbxproj # new file: gittest/gittest/en.lproj/InfoPlist.strings # new file: gittest/gittest/gittest-Info.plist # new file: gittest/gittest/gittest-Prefix.pch # new file: gittest/gittest/gittestAppDelegate.h # new file: gittest/gittest/gittestAppDelegate.m # new file: gittest/gittest/iPad/en.lproj/MainWindow_iPad.xib # new file: gittest/gittest/iPad/gittestAppDelegate_iPad.h # new file: gittest/gittest/iPad/gittestAppDelegate_iPad.m # new file: gittest/gittest/iPhone/en.lproj/MainWindow_iPhone.xib # new file: gittest/gittest/iPhone/gittestAppDelegate_iPhone.h # new file: gittest/gittest/iPhone/gittestAppDelegate_iPhone.m # new file: gittest/gittest/main.m # # Changed but not updated: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # modified: gittest/gittest.xcodeproj/project.pbxproj # # Untracked files: # (use "git add ..." to include in what will be committed) # # gittest/gittest.xcodeproj/project.xcworkspace/ # gittest/gittest.xcodeproj/xcuserdata/
很明顯,Xcode是修改一個Git倉庫,它沒有被告知來管理。
有沒有人遇到過這個?我假設這是一個功能,並有一些偏好禁用它,但對於我的生活,我無法找到它。
公平地說,它只是修改索引。 – 2011-06-16 21:18:22
是的,我想這是事實。儘管如此,它仍然困擾着我。 :( – Tom 2011-06-16 23:52:55