Last active
February 15, 2023 09:15
-
-
Save sauloefo/4ea0b461fb1dd34cfdbfbaf858fe7cc9 to your computer and use it in GitHub Desktop.
Powershell aliases for git and sfdx commands
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
# git | |
Set-Alias -Name g -Value git -Option ReadOnly | |
Function Git-Status { git status $args } | |
Set-Alias -Name gs -Value Git-Status -Option ReadOnly | |
Function Git-Commit { | |
git add . | |
git commit -m $args | |
} | |
Set-Alias -Name gc -Value Git-Commit -Option ReadOnly -Force -PassThru | |
Function Git-Amend { | |
git add . | |
git commit --amend --no-edit $args | |
} | |
Set-Alias -Name ga -Value Git-Amend -Option ReadOnly -Force -PassThru | |
Function Git-Log { git log --oneline $args } | |
Set-Alias -Name gl -Value Git-Log -Option ReadOnly -Force -PassThru | |
Function Git-Push { git push $args } | |
Set-Alias -Name gpush -Value Git-Push -Option ReadOnly | |
Function Git-Pull { git pull $args } | |
Set-Alias -Name gpull -Value Git-Pull -Option ReadOnly | |
Function Git-Reset { git reset $args } | |
Set-Alias -Name gr -Value Git-Reset -Option ReadOnly | |
# sfdx | |
Set-Alias -Name x -Value sfdx | |
Function Sfdx-Org-List { sfdx force:org:list $args } | |
Set-Alias -Name xol -Value Sfdx-Org-List -Option ReadOnly | |
Function Sfdx-Org-Create { sfdx force:org:create $args } | |
Set-Alias -Name xoc -Value Sfdx-Org-Create -Option ReadOnly | |
Function Sfdx-Org-Delete { sfdx force:org:delete $args } | |
Set-Alias -Name xod -Value Sfdx-Org-Delete -Option ReadOnly | |
Function Sfdx-Org-Open { sfdx force:org:open $args } | |
Set-Alias -Name xoo -Value Sfdx-Org-Open -Option ReadOnly | |
Function Sfdx-Source-Push { sfdx force:source:push $args } | |
Set-Alias -Name xpush -Value Sfdx-Source-Push -Option ReadOnly | |
Function Sfdx-Source-Pull { sfdx force:source:pull $args } | |
Set-Alias -Name xpull -Value Sfdx-Source-Pull -Option ReadOnly | |
Function Sfdx-Source-Retrieve { sfdx force:source:retrieve $args } | |
Set-Alias -Name xsr -Value Sfdx-Source-Retrieve -Option ReadOnly | |
Function Sfdx-Source-Deploy { sfdx force:source:deploy $args } | |
Set-Alias -Name xsd -Value Sfdx-Source-Deploy -Option ReadOnly | |
Function Sfdx-Config-Set { sfdx config:set $args } | |
Set-Alias -Name xcs -Value Sfdx-Config-Set -Option ReadOnly | |
Function Sfdx-Config-Set-Default-Username { sfdx config:set defaultusername=$args } | |
Set-Alias -Name xcsu -Value Sfdx-Config-Set-Default-Username -Option ReadOnly | |
Function Sfdx-Config-Set-Default-Devhub-Username { sfdx config:set defaultdevhubusername=$args } | |
Set-Alias -Name xcsv -Value Sfdx-Config-Set-Default-Devhub-Username -Option ReadOnly | |
Function Sfdx-Config-Get { sfdx config:get $args } | |
Set-Alias -Name xcg -Value Sfdx-Config-Get -Option ReadOnly | |
Function Sfdx-Config-List { sfdx config:list $args } | |
Set-Alias -Name xcl -Value Sfdx-Config-List -Option ReadOnly | |
Function Sfdx-Config-Unset { sfdx config:unset $args } | |
Set-Alias -Name xcu -Value Sfdx-Config-Unset -Option ReadOnly | |
Function Sfdx-Alias-Set { sfdx alias:set $args } | |
Set-Alias -Name xas -Value Sfdx-Alias-Set -Option ReadOnly | |
Function Sfdx-Alias-List { sfdx alias:list $args } | |
Set-Alias -Name xal -Value Sfdx-Alias-List -Option ReadOnly | |
Function Sfdx-Alias-Unset { sfdx alias:unset $args } | |
Set-Alias -Name xau -Value Sfdx-Alias-Unset -Option ReadOnly | |
Function Sfdx-Auth-Web-Login { sfdx auth:web:login $args } | |
Set-Alias -Name xlogin -Value Sfdx-Auth-Web-Login -Option ReadOnly | |
Function Sfdx-Auth-Logout { sfdx auth:logout $args } | |
Set-Alias -Name xlogout -Value Sfdx-Auth-Logout -Option ReadOnly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment