# Xcode 的 Git 版本管理 > [time=Mon, Mar 12, 2018 3:46 PM] ###### tags: `Xcode` `git` 因 `Xcode` 關係,即使開啟 `Xcode` 不做任何修改檢查 `git status` 總是會出現某個與程式碼無關的文件被修改。 ![](https://i.imgur.com/Ayd4DN7.png) ## 1. 新增 .gitignore `cd` 到專案的目錄 ``` vim .gitignore ``` ## 2. 編輯 .gitignore 可依照個人需求再做部分調整 ``` .DS_Store .idea/ project.xcworkspace/ xcuserdata/ *.xcuserstate *.podspec project.xcworkspace UserInterface.xcuserstate UserInterfaceState.xcuserstate xcuserdata ``` ## 3. 刪除已加入 Git 的檔案 告知 `Git`,哪些是我們將要刪除的檔案 ``` git rm <file> ``` --- * 參考 https://zlargon.gitbooks.io/git-tutorial/content/file/remove.html * 參考 http://blog.csdn.net/abc649395594/article/details/45318297