I am working on a solution where we're checking in code. Each time there is a check in, it checks in a csproj.user which reflects current user's config. How can we make a rule to not check in this file? We're using Visual Studio Team Services (was Visual Studio Online) with TFVC as our source control.
Asked
Active
Viewed 6,876 times
1 Answers
3
You can include *.user in .tfignore file (.gitignore for Git), then delete these files from version control server and check in changes if .user file has already been added to version control server.
Create .ignored file if you are using TFVC, you can refer to this article. (For Git, there is .gitignore file)
On the other hand, there is an similar issue.

Community
- 1
- 1

starian chen-MSFT
- 33,174
- 2
- 29
- 53
-
I am not using git, I am using team foundation services. TFS – Jacky Oct 05 '16 at 17:32
-
@Jacky For VSTS (Team Foundation services) with Team Foundation Version Control system (TFVC) , you can use .tfignore. By the way, there are TFVC and Git version control system in VSTS/TFS, there isn't TFS version control system. I think you mean TFVC. – starian chen-MSFT Oct 06 '16 at 02:13
-
Hi @starain, yes I mean TFVC, can you send me a link for the details using TFVC? – Jacky Oct 06 '16 at 23:26
-
@Jacky You can refer to this article to create .ignored file. (https://www.visualstudio.com/docs/tfvc/add-files-server#customize-which-files-are-ignored-by-version-control). You can open file system, then create a txt file in current working folder (workspace mapping folder), then in the Pending Changes page, in the Excluded Changes section, choose the Detected changes link, select a file, open its context menu, and choose Ignore this local item, Ignore by extension, Ignore by file name, or Ignore by folder. After that it will create a .tfignore file. – starian chen-MSFT Oct 07 '16 at 01:41
-
Will this change need to take place for each user, or it will make the change for all users? – Jacky Oct 09 '16 at 20:10
-
1@Jacky You can add .tfignore file to version control, then others could get this file from server, after that the *.user files will be ignored too in others workspace. – starian chen-MSFT Oct 10 '16 at 03:31