问题
I've done some research, but I can't seem to find the answer in the Microsoft docs. I was wondering if someone with TFS experience could let me know if it's possible to checkin a file without creating a workspace through the TF command line.
回答1:
No it's not possible.
A few alternatives:
You could create a very small workspace mapping:
For example:
$/TFS/Project/Folder/SubFolder/
mapping to C:\Work\
.
Perform a non-recursive "get" on just the file you want to edit.
For example:
Map $/TFS
to C:\Code\
and then just do a get (either in VS or "tf get $/Whatever") on the file you want.
Web Access
If you have TFS 2015, there is "Quick Code Editing" that allows you to edit via the web interface, more here.
回答2:
No, this is not possible. You always need a workspace mapping.
You could create a small batch file which does the steps required, or create a small C# console app.
来源:https://stackoverflow.com/questions/33127760/tfs-checkin-without-workspace