-
Notifications
You must be signed in to change notification settings - Fork 0
Home
git-tfs is a two-way bridge between TFS and git, similar to git-svn. It fetches TFS commits into a git repository, and lets you push your updates back to TFS.
The most recent version is 0.17.1. See change history for details.
If you're having problems, check out the troubleshooting page. And read how to report an issue, before doing so ;)
Either download a binary, use Chocolatey or build from source:
git clone git://github.com/git-tfs/git-tfs.git
cd git-tfs
msbuild GitTfs.sln
set PATH=%PATH%;%cd%\GitTfs\bin\Debug
The last step adds git-tfs.exe to your path. If you download a package, you'll need to complete this step, too.
# [optional] find a repository path to clone :
git tfs list-remote-branches http://tfs:8080/tfs/DefaultCollection
# clone the whole repository (wait for a while...) :
git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project
# or, if you're impatient (only last changeset) :
git tfs quick-clone http://tfs:8080/tfs/DefaultCollection $/some_project
cd some_project
git log # shows your TFS history, unless you did quick-clone
tf history # error: no workspace ;)
# [do work, do work, just using git], then...
# gets latest from TFS to the branch tfs/default :
git tfs fetch
# commit on TFS :
git tfs rcheckin
# or shelve your changes :
git tfs shelve MY_AWESOME_CHANGES
git-tfs is designed to work outside of any existing TFS workspaces.
This is the complete list of commands in the master branch on github.
- list-remote-branches - since 0.17
- clone - since 0.9
- quick-clone - since 0.9
- bootstrap - since 0.11
- init - since 0.9
- clone - since 0.9
- fetch - since 0.9
- pull - since 0.9
- quick-clone - since 0.9
- unshelve - since v0.12
- shelve-list - since v0.12
- init-branch - since v0.16 ( prefer the branch command )
- labels - since v0.17
- rcheckin - since v0.12
- checkin - since 0.10
- checkintool - since 0.10
- shelve - since 0.9
- list-remote-branches - since 0.17
- branch - since 0.17
- init-branch - since v0.16 ( prefer the branch command )
- info
- cleanup - since 0.10
- cleanup-workspaces - since 0.10
- diagnostics - since 0.9
- help - since 0.9
- verify - since 0.11
- autotag option - since v0.12
If you contribute patches, please set core.autocrlf
to true
. (git config core.autocrlf true
)
Contributions are always welcome. For more information about contributing, please see Contributing page.
Check out the README.
If you're migrating a TFS server from 2008 or 2005 to 2010, you might want to Specify Alternate TFS URLs.
If you have questions or suggestions about how we could improve git-tfs you could go to google group.
Example of setting up central git repository that tracks TFS automatically.