任何語言,一些文件是不能提交的。git
Java開發的項目:*.class是不能提交的spa
C#開發的項目:*.dll,*.user,obj/,bin/是不能提交的翻譯
本人查閱了官方資料,原文不能就不翻譯了。code
Ignore item(s) only in containing folder(s)orm
Only ignore the selected pattern(s) within that folder(s). 開發
Ignore item(s) recursively
Ignore items with the selected pattern(s) in that folder(s) and child folder(s). rem
.gitignore in the repository root
Write the ignore entries in .gitignore in the repository root. This allows you to synchronize the ignore list with remote repository. it
.gitignore in the containing directories of the items
Write the ignore entries in .gitignore in the containing directories of the items. This allows you to synchronize the ignore list with remote repository. class
.git/info/exclude
Write the ignore entries in .git/info/exclude in repository metadata. This allows you to store the ignore list locally, but cannot synchronize with remote repository. select
如如下針對某個C#項目的.gitignore文件
/WinForm-ProgressBar/*.user /WinForm-ProgressBar/bin/Debug /WinForm-ProgressBar/obj/Debug