Created
April 13, 2025 13:23
-
-
Save Sinewyk/3f9a1fd16a1317dc1bc895e0432c8169 to your computer and use it in GitHub Desktop.
Powershell profile for git
This file contains hidden or 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
function Get-GitStatus { & git status -sb $args } | |
Set-Alias -Name gst -Value Get-GitStatus -Force -Option AllScope | |
Set-Alias -Name gs -Value Get-GitStatus -Force -Option AllScope | |
function Get-GitDiff { & git diff $args } | |
Set-Alias -Name gd -Value Get-GitDiff -Force -Option AllScope | |
function Get-GitCommit { & git commit -v $args } | |
Set-Alias -Name gc -Value Get-GitCommit -Force -Option AllScope | |
function Get-GitCommitAmmend { & git commit -v --amend $args } | |
Set-Alias -Name gc! -Value Get-GitCommitAmmend -Force -Option AllScope | |
function Get-GitAdd { & git add $args } | |
Set-Alias -Name ga -Value Get-GitAdd -Force -Option AllScope | |
function Get-GitTree1 { & git log $args } | |
Set-Alias -Name gl -Value Get-GitTree1 -Force -Option AllScope | |
function Get-GitTree2 { & git log --graph --oneline --decorate $args } | |
Set-Alias -Name glo -Value Get-GitTree2 -Force -Option AllScope | |
function Get-GitPush { & git push $args } | |
Set-Alias -Name gp -Value Get-GitPush -Force -Option AllScope | |
function Get-GitPull { & git pull --rebase $args } | |
Set-Alias -Name gup -Value Get-GitPull -Force -Option AllScope | |
function Get-GitFetch { & git fetch $args } | |
Set-Alias -Name gf -Value Get-GitFetch -Force -Option AllScope | |
function Get-GitCheckout { & git checkout $args } | |
Set-Alias -Name gco -Value Get-GitCheckout -Force -Option AllScope | |
function Get-GitBranch { & git branch $args } | |
Set-Alias -Name gb -Value Get-GitBranch -Force -Option AllScope | |
function Get-GitRemote { & git remote -v $args } | |
Set-Alias -Name gr -Value Get-GitRemote -Force -Option AllScope | |
function Get-GitMerge { & git merge $args } | |
Set-Alias -Name gm -Value Get-GitMerge -Force -Option AllScope | |
function Get-GitMergeFF { & git merge --ff-only $args } | |
Set-Alias -Name gmff -Value Get-GitMergeFF -Force -Option AllScope | |
function Get-GitTagList { & git tag -l --sort=-creatordate $args } | |
Set-Alias -Name gtl -Value Get-GitTagList -Force -Option AllScope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to put in
C:\Users\%USER%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1