Developer, tech enthusiast, and gamer.

Quick Tip: Alias Hub as Git on Windows

Quick Tip: Alias Hub as Git on Windows

If you use Git with GitHub, the Hub wrapper utility by GitHub is a better cli option for working with your personal and org repositories. In addition to all of the normal git commands, you gain GitHub specific ones like fork, pull-request, browse, and many others.

Install Go Dev Enviroment

  1. choco install golang -y
  2. Add/Set the %GOPATH% environment variable that points to your Go installation bin directory. If installed via Chocolatey, that path is C:\tools\go\bin

Install Hub

  1. go get
  2. Add Hub to %Path% environment variable C:\tools\go\bin\bin

Set up your aliases

In order to save your alias between sessions, you need to do a bit more setup depending on your preferred shell.


  1. Find your default profile. Fastest way is to open a Powershell window and use the following command Get-Variable profile. This will return something like c:\Users\myname\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
  2. Edit the above file and add the following line Set-Alias git hub. The result should look like the following:


  1. Create a batch file that will hold the alias command, something like C:\Utils\aliases.bat
  2. Add the following line to the batch file doskey git=hub. The result should look like the following:

You can use your new alias file in a couple of ways depending on what you want to do.

  1. Just launch cmd.exe with and pass in your new alias file cmd.exe /K c:\Utils\aliases.bat. Now all of your doskey commands will be available in that console session
  2. Add to the registry so your aliases are available in every console session automatically. Run regedit and go to HKEY_CURRENT_USER -> Software -> Microsoft -> Command Processor. Add String Value entry with the name AutoRun and the full path of your .bat/.cmd file c:\Utils\aliases.bat. See the full answer on StackOverflow.

Hub is now Git

Your friendly Email to Slack migration guide

Your friendly Email to Slack migration guide

Running your Azure WebJobs with the Kudu API