Before proceeding, ensure that your .tfignore
file has been successfully created without any issues. Remember, this file should not have any file extension. One simple method to create it is by renaming a new.txt file to "tfignore." The file will automatically convert to the correct .tfignore format.
If you prefer using an automatically generated .tfignore file, follow the steps below:
On the Pending Changes page, navigate to the Excluded Changes section and select the Detected changes link.
A dialog box named Promote Candidate Changes will appear.
- Select a file, right-click to open its context menu, and choose either Ignore this local item, Ignore by extension, Ignore by file name, or Ignore by folder.
- Click OK or Cancel to close the Promote Candidate Changes dialog box.
- You will see a .tfignore file in the Included Changes section of the Pending Changes page. You can edit this file as needed to customize which files are ignored by version control.
For more information, refer to the Customize which files are ignored by version control section on MSDN Link: Add files to the server
Furthermore, if you encounter issues like mentioned by MrHinsh, where the process doesn't work when the files are already under source control, consider creating new js and js.map files for testing purposes. If the existing files are in source control, you may need to unbind/bind them.
An alternate solution could involve updating your Visual Studio to VS2015Update 3, as the .tfignore feature should function correctly with this update. For detailed instructions, check out the GitHub blog post: Things in ".tfignore" still are shown in pending changes