如何将Ionic项目的.gitignore转换为TFS适用的.tfignore文件?
Got it, converting an Ionic .gitignore to a .tfignore for TFS is super straightforward since they use nearly identical wildcard patterns. Here's how to get it set up properly to keep your repo clean of unnecessary files:
Converted Ionic .tfignore for TFS
Drop this .tfignore file at the root of your TFS repository—it mirrors the rules from your original Git ignore, adjusted for TFS syntax:
# Ignored files for Ionic project (TFS source control) *~ *.sw[mnpcod] *.log *.tmp *.tmp.* log.txt *.sublime-project *.sublime-workspace .vscode/ npm-debug.log* .idea/ .sourcemaps/ .sass-cache/ .tmp/ .versions/ coverage/ dist/ node_modules/ tmp/ temp/ # Ignore all content under hooks/ (TFS-compatible pattern) hooks/**/*
Important TFS-Specific Tips
- If any of these files/folders are already tracked in TFS, the
.tfignorewon't retroactively ignore them. You'll need to remove them from source control first while keeping local copies—use the commandtf undo /keep <file/folder path>or the TFS UI's "Undo Pending Changes" option with "Keep Local" checked. - TFS doesn't recognize Git's
hooks/...syntax, so we replaced it withhooks/**/*to ignore every file and subfolder underhooks/. - Don't forget to check in the
.tfignorefile itself to TFS—this ensures the rules apply to everyone working on the project. - Like
.gitignore, the.tfignoreonly affects untracked files going forward, so new files matching these patterns won't show up as pending changes.
That should do the trick—this will prevent all those build artifacts, IDE configs, and dependencies from cluttering up your TFS repo.
内容的提问来源于stack exchange,提问作者Joe Starnes
相关产品推荐
相关产品推荐

