Windows + CMD + TortoiseGit

Adrian Godong
Aug 29, 2017 · 1 min read

Another follow up from my previous post about adding a shortcut to TortoiseGit from Git Bash, this time I’m going to add a shortcut to launch TortoiseGit from Windows CMD.

First of all, we need to set up an alias for TortoiseGitProc.exe. It’s a mouthful name and we’ll simplify it to tgit. There’s a utility called doskey that will create such macro/shortcuts. For our purpose, you can execute the following in cmd and have the same experience as Git Bash:

doskey tgit=TortoiseGitProc.exe /command:$*

This command does not persist over different cmd sessions. That means if you close your cmd window, the next one you open, you will have to execute the same command again before you can use the shortcut.

There’s a way to automatically run such commands whenever you open cmd. A complete list of ways can be found on the following StackOverflow question and answers:

I personally chose the Registry mod. I created a file called alias.cmd under my user folder (C:\Users\[User Name]) and use "%USERPROFILE%\alias.cmd" for the registry key value. Include the double quotes if your user name has a space.

)

Adrian Godong

Written by

I code. I shoot. I sleep.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade