Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,124 | Comments: 45,486

filter by tags archive

Executing TortoiseGit from the command line

time to read 2 min | 235 words

Originally posted at 1/6/2011

I love git, but as much as I like the command line, there are some things that are ever so much simple with a UI. Most specifically, due to my long years of using TortoiseSVN, I am very much used to the way TortoiseGit is working.

I still work from the command line a lot, and I found myself wanting to execute various actions on the UI from the command line. Luckily, it is very easy to do so with TortoiseGit. I simply wrote the following script (tgit.ps1):

& "C:\Program Files\TortoiseGit\bin\TortoiseProc.exe" /command:$cmd /path:.

And now I can execute the following from the command line:

tgit log

tgit commit

And get the nice UI.

Please note that I am posting this mostly because I want to be able to look it up afterward. I am sure your git tools are superior to mine, but I like the way I am doing things, and am reluctant to change.


Ken Egozi

The last paragraph is hilarious :)

that's a great tip

Daniel Grunwald

Please note that I am posting this mostly because I want to be able to look it up afterward.

Thanks for reminding me!

I wrote a very similar script (as .bat file) in February 2010 and completely forgot to use it. (and you are wrong: no, my git tools aren't superior.)

Also, I find that Diff and Commit are the only commands for which I use TortoiseGit. For the log, I use gitk (comes with msysgit), because TortoiseGit is missing support for --date-order and --show-notes. For anything else, I simply use the command line client.

josh (@rebootd)

Cool, nice tip. I have yet to use any git GUI tools though. Not that I'm against it, just have needed to nor made the time.


Ayende, is the directory "C:\Program Files\TortoiseGit\bin\" in your %path%? TortoiseGit already has a tgit.exe wrapper in that location.

Ayende Rahien


Yes, it is.

This script if before the tgit.exe directory in the path

Comment preview

Comments have been closed on this topic.


  1. The design of RavenDB 4.0: Physically segregating collections - one day from now
  2. RavenDB 3.5 Whirlwind tour: I need to be free to explore my data - about one day from now
  3. RavenDB 3.5 whirl wind tour: I'll have the 3+1 goodies to go, please - 5 days from now
  4. The design of RavenDB 4.0: Voron has a one track mind - 6 days from now
  5. RavenDB 3.5 whirl wind tour: Digging deep into the internals - 7 days from now

And 11 more posts are pending...

There are posts all the way to May 30, 2016


  1. RavenDB 3.5 whirl wind tour (14):
    04 May 2016 - I’ll find who is taking my I/O bandwidth and they SHALL pay
  2. The design of RavenDB 4.0 (13):
    03 May 2016 - Making Lucene reliable
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats