Creating an awesome git experience on Windows
Use git like a master on windows
Configure a better console
The console has become an essential part of day-to-day development, angular
, reactjs
, git
, and netcore
tooling rely on. So why not make it awesome :fist:.
- Install λ Cmder for the best console experience (no
fishshell
on windows). λ Cmder is an extension on-top of ConEmu. - Enable Quake mode in Cmder/ConEmu. This allow you to open a command prompt by pressing ctrl + ~.
- Install
post-git
Add aliases for common commands
Except for the high frequency commands, I have followed an approach of making aliases plural, e.g. tags
, remotes
, and branches
to view all.
However, my favourite command above is yolo
(see what it does) :boom: :smile:.
Save the precious keystrokes
For the power users, you can alias g
for git
.
To do this, add the following to your powershell
profile (use code $Profile
to open).
function Get-Git { & git $args }
New-Alias g Get-Git -Force -Option AllScope
Unfortunately, with the alias g
you lose the modify hack posh-git
to get this working.
In your λ cmder
console, type the following (assuming that you have VS Code installed).
code (Get-Command TabExpansion).ScriptBlock.File
Scroll to the bottom and add the following
function TabExpansion($line, $lastWord) {
$line = $line -replace '^g ', 'git '
// leave the remaining as-in
}