Skip to content

Instantly share code, notes, and snippets.

@Nick-Gabe
Last active June 18, 2023 16:35
Show Gist options
  • Save Nick-Gabe/93f428ebca983ece2f83469067334647 to your computer and use it in GitHub Desktop.
Save Nick-Gabe/93f428ebca983ece2f83469067334647 to your computer and use it in GitHub Desktop.
All my aliases for
alias killport="netstat -vanp tcp | grep $1"
alias commit="git commit -m $1"
alias opull="git pull origin"
alias opush="git push origin"
alias gpull="git pull origin HEAD"
alias gpush="git push origin HEAD"
alias gback="git reset HEAD~1"
alias aliases="cat ~/.zshrc | grep alias"
alias editalias="vim ~/.zshrc"
alias simbora="git commit -m $1 --no-verify && git push origin HEAD"
alias restart="git stash && switch main && git stash pop"
Function KillPort { npx kill-port $args[0] }
Set-Alias -Name killport -value KillPort
Function GitCommit { git commit -m $args[0] }
Set-Alias -Name commit -value GitCommit
Function GitPull { git pull origin @args }
Set-Alias -Name opull -value GitPull
Function GitPush { git push origin @args }
Set-Alias -Name opush -value GitPush
Function GitPullHead { git push origin HEAD }
Set-Alias -Name gpull -value GitPullHead
Function GitPushHead { git push origin HEAD }
Set-Alias -Name gpush -value GitPushHead
Function GitBack { git reset HEAD~1 }
Set-Alias -Name gback -value GitBack
Function GitForcePush { git commit -m $args[0] --no-verify && git push origin HEAD }
Set-Alias -Name simbora -value GitForcePush
Function GitRestart { git stash && git switch main && git stash pop }
Set-Alias -Name restart -value GitRestart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment