Solution to adding a Git (TortoiseGit) toolbar to Visual Studio

Anyone know how to create a toolbar in Visual Studio 2010 to use with Git (TortoiseGit)?

Thanks

  • How can I stop and start TGitCache.exe gracefully
  • Get TortoiseGit to remember my passphrase (no putty)
  • Git with SSH on Windows
  • Move specific git commit from master to branch
  • Using git-svn, how do I dcommit tags?
  • TortoiseGit equivalence for 'TortoiseSVN --> Show log --> Revert to this revision'
  • SurfRat

  • Warning: push.default is unset; its implicit value is changing in Git 2.0
  • Any nice way to generate a timeline view of commits from subversion?
  • svk checksum mismatch
  • git svn rebase: Incomplete data: Delta source ended unexpectedly
  • Does the .git directory hold remote passwords or SSH keys?
  • TortoiseGit - pre-rebase hook not executed
  • One Solution collect form web for “Solution to adding a Git (TortoiseGit) toolbar to Visual Studio”

    enter image description here

    I wanted a Git toolbar in Visual Studio and I found no solution to this so I thought I would share this with you.

    I installed the Git Source Control Provider and got Git working (via TortoiseGit) with the right click context menu. This was tedious and rather ugly as all the TortoiseGit commands had the same icon.

    I then added external tools to Visual Studio…

    enter image description here

    enter image description here

    The external tool commands for TortoiseGit are as follows:

    Title: Git Push
    Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
    Arguments: /path:"$(SolutionDir)" /command:push
    
    Title: Git Commit
    Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
    Arguments: /path:"$(SolutionDir)" /command:Commit
    
    Title: Git Sync
    Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
    Arguments: /path:"$(SolutionDir)" /command:Sync
    
    Title: Git Revert
    Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
    Arguments: /path:"$(SolutionDir)" /command:Revert
    
    Title: Git Log
    Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
    Arguments: /path:"$(SolutionDir)" /command:Log
    

    Once the external commands were created I created my toolbar. Visual Studio 2010 out of the box will not allow you to have an image in your toolbar so I installed the Command Image Changing Extension.

    Here are the icons I created
    enter image description here
    enter image description here
    enter image description here
    enter image description here
    enter image description here

    The end result is a toolbar with the commands (showing only icons) that I need.

    Update for Visual Studio 2012

    The commands have changed slightly and are as follows:

    Title: Git Commit
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments: /path:"$(SolutionDir)" /command:commit
    
    Title: Git Push
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments: /path:"$(SolutionDir)" /command:push
    
    Title: Git Sync
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments: /path:"$(SolutionDir)" /command:sync
    
    Title: Git Compare
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments:  /path:"$(ItemPath)" /command:diff
    
    Title: Git Revert
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments: /path:"$(SolutionDir)" /command:revert
    
    Title: Git Log
    Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
    Arguments: /path:"$(SolutionDir)" /command:log
    
    Git Baby is a git and github fan, let's start git clone.