ios 專案 gitignore 檔案配置

2021-08-07 21:16:45 字數 1327 閱讀 1021

能夠列入到**版本控制的檔案是有規定的,不能是編寫的二進位制檔案、臨時檔案和使用者特有的檔案等。

本人用的xcode 是8.3.3版本

xcode4 以上版本,我認為必要的配置項為:

# xcode

.ds_store

build/

xcuserdata/

xcshareddata/

.idea/

如果是xcode 3 和xcode 4版本

檔案考慮到了x code 3和4差別,需要過濾的檔案多出一些

# exclude the build directory   

build/*

# exclude temp nibs and swap files

*~.nib

*.swp

# exclude os x folder attributes

.ds_store

# exclude user-specific xcode 3 and 4 files

*.mode1

*.mode1v3

*.mode2v3

*.perspective

*.perspectivev3

*.pbxuser

*.xcworkspace

xcuserdata

# exclude the build directory

build/*

# exclude temp nibs and swap files

*~.nib

*.swp

# exclude os x folder attributes

.ds_store

# exclude user-specific xcode 3 and 4 files

*.mode1

*.mode1v3

*.mode2v3

*.perspective

*.perspectivev3

*.pbxuser

*.xcworkspace

xcuserdata

如果考慮適用於所有的xcode工程,則需要使用git config命令配置git,在終端中執行git config命令:

$ git config –global core.excludesfile  ~/.gitignore

該命令會將配置資訊寫入到~/.gitconfig檔案中,–global引數是配置全域性資訊,~/.gitignore說明檔案是放置於當前使用者目錄下。

iOS中 gitignore的使用

在需要建立 gitignore 檔案的資料夾,進入命令列,進入專案所在目錄。輸入 touch gitignore 在資料夾就生成了乙個 gitignore 檔案。然後在 gitignore 檔案裡輸入你要忽略的資料夾及其檔案就可以了。在git中如果想忽略掉某個檔案,不讓這個檔案提交到版本庫中,可以使...

Unity專案的 gitignore配置

unity專案只需要關注assets projectsettings packages三個資料夾的版本控制。最新版的unity基本已經將設定預設為可版本管理狀態。我使用的版本是unity2019.4.13。如果不放心,大家可以自行檢視一下這兩個配置的地方是否正確。edit 專案設定 編輯器 確保如下...

Git使用gitignore建立專案過濾規則

在進行協作開發 管理的過程中,常常會遇到某些臨時檔案 配置檔案 或者生成檔案等,這些檔案由於不同的開發端會不一樣,如果使用git add 將所有檔案納入git庫中,那麼會出現頻繁的改動和push,這樣會引起開發上的不便。git可以很方便的幫助我們解決這個問題,那就是建立專案檔案過濾規則。git中提供...