Fetch Command

The Fetch command fetches the latest changes from a StarTeam View into FETCH_HEAD of the local Git repository.

Arguments

<starteam connection string>
Connection string format:
[starteam://]<hostname>:<port>/<project name>[/<view name>][/<folder name>]
<directory>
Git working directory.

Options

--auto-cache-agent
Autolocate the Cache Agent to use while checking out the source code.
--deep (-d)
Performs a deep fetch/pull/push, creating commits in the Git repository for each StarTeam Change Package since the last fetch. If the deep option is not specified, then the collection of StarTeam Change Packages will be grouped into a single commit in Git.
--eol (cr|lf|crlf|off|platform)
Automatically convert the end-of-line markers while checking out files from StarTeam Server. The default is off, no end-of-line conversion is performed.
Note:
  • Regardless of the EOL setting in the file's properties in the StarTeam Cross-Platform Client (Fixed CR\LF\CRLF, Client defined), the -eol cr, lf, and crlf value will always override that setting.
  • When -eol platform option is used then pulled/fetched files will have the platform-specific EOL setting:
    • Microsoft Windows: CRLF.
    • Linux: - LF.
    • Mac: - CR.
--force (-f)
Performs a force Fetch/Pull by downloading the latest Change Set.
--help (-h)
Command usage text.
--password (-p) <password>
StarTeam Password. If the password is not specified and has not been cached during previous commands then you will be prompted for a password.
--quiet (-q)
Progress is not reported.
--shallow
Creates a single commit for all StarTeam Change Packages in the fetch.
--use-cache-agent <host:port>
Use Cache Agent <host:port> while checking out the source code.
--username (-u) <username>
StarTeam user that will perform this operation. If the StarTeam User name is not specified during the fetch/pull/push, then the user that was specified during the clone will automatically be used.
--verbose (-v)
Verbose mode.

Example

Fetches the latest changes from StarTeam Server into FETCH_HEAD ref. Run the following command to perform a fetch.

C:\gitdemo\Sample>git st fetch

Followed by a prompt for password.

Important: As the subsequent fetch, pull, and push commands are issued against the same Project/View/Folder hierarchy as the clone command, if you choose to provide the Project/View/Folder during these commands then they must match the structure from clone. We recommend that you only pass the Project/View/Folder path in a fetch, pull, or push if you need to specify a new server address or port.