Skip to content

Instantly share code, notes, and snippets.

@dwayne
Created December 19, 2012 12:28

Revisions

  1. dwayne revised this gist Dec 19, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions git-tfs-integration.md
    Original file line number Diff line number Diff line change
    @@ -41,8 +41,8 @@ http://www.microsoft.com/en-us/download/details.aspx?id=30474

    1. If you don't want to be prompted for credentials every time you run `git-tf`, you can store your credentials in your Git configuration.

    $ git config --global git-tf.server.username your-username
    $ git config --global git-tf.server.password your-password
    $ git config --global git-tf.server.username your-username
    $ git config --global git-tf.server.password your-password

    ## Workflow

  2. dwayne revised this gist Dec 19, 2012. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions git-tfs-integration.md
    Original file line number Diff line number Diff line change
    @@ -37,6 +37,13 @@ http://www.microsoft.com/en-us/download/details.aspx?id=30474

    $ git tf clone https://caribbeanideas.visualstudio.com $/existing-tfs-project

    ## Tips

    1. If you don't want to be prompted for credentials every time you run `git-tf`, you can store your credentials in your Git configuration.

    $ git config --global git-tf.server.username your-username
    $ git config --global git-tf.server.password your-password

    ## Workflow

    # Make sure you're working with your team's latest code by pulling from TFS
  3. dwayne revised this gist Dec 19, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions git-tfs-integration.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Git and TFS Integration

    http://gittf.codeplex.com/

    http://www.microsoft.com/en-us/download/details.aspx?id=30474

    ## Resources
  4. dwayne created this gist Dec 19, 2012.
    66 changes: 66 additions & 0 deletions git-tfs-integration.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    # Git and TFS Integration

    http://gittf.codeplex.com/
    http://www.microsoft.com/en-us/download/details.aspx?id=30474

    ## Resources

    - http://visualstudiomagazine.com/articles/2012/08/13/tfs-now-integrated-with-git.aspx
    - http://stackoverflow.com/questions/12866832/whats-the-difference-between-git-tf-and-git-tfs
    - git-tfs built for Windows and written on top of .NET TFS SDK
    - git-tf was built for cross-platform users and written on top of JAVA TFS SDK

    ## Setting up on Ubuntu 12.04

    - Download git-tf from http://www.microsoft.com/en-us/download/details.aspx?id=30474
    - Unzip the package and read Git-TF_GettingStarted.html
    - Prerequisites include:
    - Latest version of Git
    - see https://gist.github.com/3003724#file-gitconfig-md for configuration details
    - Java SDK
    - http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html
    - Now just add the path to the git-tf folder and follow along with http://tfs.visualstudio.com/en-us/learn/code/use-git-and-xcode-with-tfs/ and you'd be up and running in no time

    ## How to create and checkin a new Git repo into TFS?

    $ mkdir example-git-tf-project && cd example-git-tf-project
    $ ... do some stuff ...
    $ git init && git add . && git commit -m "Initial commit"

    # The following step only needs to be done once:
    $ git tf configure https://caribbeanideas.visualstudio.com $/example-git-tf-project

    $ git tf checkin

    ## How to access an existing TFS project?

    $ git tf clone https://caribbeanideas.visualstudio.com $/existing-tfs-project

    ## Workflow

    # Make sure you're working with your team's latest code by pulling from TFS
    $ git tf pull

    $ git checkout -b topic-branch dev
    $ ... do some work locally in your git repo and test ...
    $ git add .
    $ git commit -m "Describe your commit"

    # Merge your changes into the local development branch and maybe do some more testing
    $ go dev && git merge topic-branch

    # Merge your changes into the master branch
    $ go master && git merge dev

    # Update TFS
    $ git tf checkin

    # or
    # Maybe you're working on a task or fixing a bug that's tracked as a work item. Then indicate
    # that when you check in. TFS will resolve the bug or close the task, and it'll link the
    # changeset to the work item. That will trace through to things like build reports
    $ git tf checkin --resolve=xxxxx

    ## Help

    $ git tf help