Loading repository data…
Loading repository data…
jamesallman / repository
PowerShell implementation of zsh-style Git aliases for Windows users. Complete collection of Git shortcuts that streamline common Git operations in PowerShell.
PowerShell implementation of zsh-style Git aliases for Windows users. Complete collection of Git shortcuts that streamline common Git operations in PowerShell.
This repository contains a PowerShell script (Install-GitAliases.ps1) that configures your PowerShell profile with Git aliases similar to those available in zsh/oh-my-zsh. If you're familiar with Git aliases in zsh and want the same functionality in PowerShell, this script sets up everything for you with a single command.
.\Install-GitAliases.ps1
The script will:
Here are some of the most commonly used Git aliases included:
| Alias | Git Command |
|---|---|
| g | git |
| ga | git add |
| gaa | git add --all |
| gst | git status |
| gco | git checkout |
| gcb | git checkout -b |
| gcm | git checkout main |
| gcd | git checkout develop |
| gl | git pull |
| gp | git push |
| gpsup | git push --set-upstream origin $(git_current_branch) |
| gcmsg | git commit --message |
| gd | git diff |
| gf | git fetch |
| gfa | git fetch --all --tags --prune |
| glog | git log --oneline --decorate --graph |
| grh | git reset |
| grhh | git reset --hard |
For a complete list of all aliases with descriptions, see the CHEATSHEET.md.
You can modify your PowerShell profile directly to add, remove, or customize any of the Git aliases:
notepad $PROFILE
If you encounter execution policy errors:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
To reload your profile after making changes:
. $PROFILE
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.