Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

145 lines (129 sloc) 5.601 kb
<html>
<head>
<title>A sample git-tfs session</title>
<style>
.command .prompt
{
color: yellow;
}
.command
{
color: #0f0;
}
.output
{
white-space: pre;
}
</style>
</head>
<body>
<div style="font-weight: bold; font-family: monospace; background-color: black; color: white; padding: 1em; overflow: scroll;">
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>pwd</div>
<div class="output">/d/Projects
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>git tfs clone</div>
<div class="output">Usage: git-tfs init [options] tfs-url repository-path [git-repository]
where options are:
-V, --version
(Type: Flag, Value Type:[Boolean])
ShowVersion
-h, -H, --help
(Type: Flag, Value Type:[Boolean])
ShowHelp
-i, --tfs-remote, --remote, --id
(Type: Value required, Value Type:[String])
An optional remote ID, useful if this repository will track multiple TFS repositories.
-d, --debug
(Type: Flag, Value Type:[Boolean])
Show lots of output.
--shared
(Type: Value required, Value Type:[Object])
The --shared option to pass to git-init.
--no-metadata
(Type: Flag, Value Type:[Boolean])
If specified, git-tfs will leave out the git-tfs-id: lines at the end of every commit.
--template
(Type: Value required, Value Type:[String])
The --template option to pass to git-init.
--username
(Type: Value required, Value Type:[String])
Your TFS username, including domain (e.g. DOMAIN\user).
--ignore-regex
(Type: Value required, Value Type:[String])
If specified, git-tfs will not sync any paths that match this regular expression.
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>git tfs clone http://team:8080/ $/sandbox sample_for_git_tfs</div>
<div class="output">Initialized empty Git repository in d:/Projects/sample_for_git_tfs/.git/
C4949 = 84cfc504fd85a826ede8d852e3a5e75fc8952bd2
C69840 = fb10351a88a948d07b3eb6ef176b7e3bb1999ecb
C69841 = 764abfc9995945cafce2e23a1d2735aec8d288bd
C69842 = bb87001af0e93de25e13dab4602db2f84f4b1932
C69843 = 664705c06790fbd1da066833e9e81da24c88ea61
C86163 = 99d300275e87adedae65cd3c9a57c9f55c76eb94
C86164 = 2d10de0deb9fe96e22b14eb2e65e2f95ef55c1d6
C86165 = da9da4b79b2d9e16aa17f6a12317bfe3e29687de
C86167 = b3d7f12b3cf39b546cb19ddc37518be1080b86d8
C86170 = 5df88af2597f219a7b4ccf979ff90ff1cc7ed05b
C86209 = 46d814b83a5a75508e1584a8850d8bcb3c9d5a7d
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>cd sample_for_git_tfs</div>
<div class="output"></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>ls -R</div>
<div class="output">.:
ANewDirectory
./ANewDirectory:
SomeDir
./ANewDirectory/SomeDir:
readme.txt sayhi.bat
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>echo another line &gt;&gt; ANewDirectory/SomeDir/readme.txt</div>
<div class="output"></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>git commit -a -m "Contributed using git-tfs."</div>
<div class="output">[master a72b561] Contributed using git-tfs.
1 files changed, 1 insertions(+), 0 deletions(-)
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>git tfs shelve</div>
<div class="output">Usage: git-tfs shelve [options] shelveset-name [ref-to-shelve]
where options are:
-V, --version
(Type: Flag, Value Type:[Boolean])
ShowVersion
-h, -H, --help
(Type: Flag, Value Type:[Boolean])
ShowHelp
-i, --tfs-remote, --remote, --id
(Type: Value required, Value Type:[String])
An optional remote ID, useful if this repository will track multiple TFS repositories.
-d, --debug
(Type: Flag, Value Type:[Boolean])
Show lots of output.
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>git tfs shelve GIT_TFS_SAMPLE</div>
<div class="output">edit ANewDirectory/SomeDir/readme.txt
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>mkdir ../sample_workspace</div>
<div class="output"></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>cd ../sample_workspace</div>
<div class="output"></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>tf workspace -new -noprompt sample_workspace</div>
<div class="output"></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>tf unshelve -noprompt GIT_TFS_SAMPLE</div>
<div class="output">sandbox\ANewDirectory\SomeDir:
Unshelving edit: readme.txt
</div></div>
<div class="run"><div class="command"><span class="prompt">&gt;&gt;&gt; </span>tf diff -noprompt</div>
<div class="output">edit: d:\Projects\sample_workspace\sandbox\ANewDirectory\SomeDir\readme.txt
File: sandbox\ANewDirectory\SomeDir\readme.txt
===================================================================
--- sandbox\ANewDirectory\SomeDir\readme.txt;C69843 (server) 1/28/2010 1:02 PM
+++ sandbox\ANewDirectory\SomeDir\readme.txt (local) 1/28/2010 1:02 PM
@@ -4,3 +4,4 @@
----
This line was added for the second checkin.
This line was added after the parent directory was nested inside a new top-level-directory.
+another line
===================================================================
</div></div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.