it:ad:tf:howto:common_operations

IT:AD:TF:HowTo:Common Operations

GET
  • Get into the target directory.
    • As the directory is known by TFS to be mapped to a workspace, it can deduct what Workspace we're talking about.
  • Recursively get code from the Main branch:

REM On Windows x64
cd C:\TFS\WS1\WA
"%VS110COMNTOOLS%\TF.exe" get $/NSI/Main /recursive

REM If you need to, use the force switch
"%VS110COMNTOOLS%\TF.exe" get $/NSI/Main /recursive /force

CHECKOUT

I don't recommend doing a checkout (let Visual Studio decide which files are checked out), but the code is similar, bar the command.

  • Get into the target directory.
    • As the directory is known by TFS to be mapped to a workspace, it can deduct what Workspace we're talking about.
  • Recursively checkout code from the Main branch:

REM On Windows x64
cd C:\TFS\WS1\WA
"%VS110COMNTOOLS%\TF.exe" checkout $/NSI/Main /recursive

REM If you need to, use the force switch
"%VS110COMNTOOLS%\TF.exe" checkout $/NSI/Main /recursive /force

CHECKIN

After you've made your changes, check in (same as get, just changed to checkin):

REM On Windows x64
cd C:\TFS\WS1\WA
"%VS110COMNTOOLS%\TF.exe" checkin $/NSI/Main /recursive

REM with a comment (notice colon)
"%VS110COMNTOOLS%\TF.exe" checkin $/NSI/Main /recursive /comment:"Foo bar"

REM with a comment, overridding checkin policies:
"%VS110COMNTOOLS%\TF.exe" checkin $/NSI/Main /recursive /noprompt /override:"Policy override reason" /comment:"Foo bar"

REM Hugely contraversial, bypass gated checkin:
"%VS110COMNTOOLS%\TF.exe" checkin $/NSI/Main /recursive /noprompt /bypass /override:"policy overriding reason" /comment:"Foo bar"

  • /home/skysigal/public_html/data/pages/it/ad/tf/howto/common_operations.txt
  • Last modified: 2023/11/04 02:00
  • by 127.0.0.1