Last active
March 28, 2024 12:27
-
-
Save elithrade/00f37c36f127f09927e754b4b8105236 to your computer and use it in GitHub Desktop.
Windows pwsh aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Expression (&starship init powershell) | |
Invoke-Expression (& { (zoxide init powershell | Out-String) }) | |
function Get-GitStatus { & git status -sb $args } | |
New-Alias -Name gs -Value Get-GitStatus -Force -Option AllScope | |
function Get-GitDiff { & git diff $args} | |
New-Alias -Name gd -Value Get-GitDiff -Force -Option AllScope | |
function Get-GitAdd { & git add -A . $args } | |
New-Alias -Name gaa -Value Get-GitAdd -Force -Option AllScope | |
function Get-GitCommit { & git commit -m $args } | |
New-Alias -Name gcm -Value Get-GitCommit -Force -Option AllScope | |
function Get-GitPush { & git push origin $args} | |
New-Alias -Name gpo -Value Get-GitPush -Force -Option AllScope | |
function Get-GitPull { & git pull $args } | |
New-Alias -Name gl -Value Get-GitPull -Force -Option AllScope | |
function Get-GitFetch { & git fetch origin $args } | |
New-Alias -Name gfo -Value Get-GitFetch -Force -Option AllScope | |
function Get-GitCheckout { & git checkout $args } | |
New-Alias -Name gc -Value Get-GitCheckout -Force -Option AllScope | |
function Get-GitLogPretty { git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit } | |
New-Alias -Name gll -Value Get-GitLogPretty -Force -Option AllScope | |
function Get-GitListRemote { git ls-remote --heads } | |
New-Alias -Name glrh Get-GitListRemote -Force -Option AllScope | |
function Get-GitResetHeadHard { git reset HEAD --hard } | |
New-Alias -Name grhh Get-GitResetHeadHard -Force -Option AllScope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment