Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goran-peoski-work/64262212c957d605df73970b12cf8832 to your computer and use it in GitHub Desktop.
Save goran-peoski-work/64262212c957d605df73970b12cf8832 to your computer and use it in GitHub Desktop.
C:\Users\<username>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
New-Alias ll dir
New-Alias which get-command
function listening { netstat -ano -p tcp | find `"$($args)`" | select-string "LISTENING" }
function forceclose { taskkill /f /pid $args }
function status { git status $args }
function tags { git tag -l -n1 $args }
function branches { git branch -l $args }
function worktrees { git worktree list $args }
function branchout { git checkout -b $args }
function branchin { param($id, $branch) git fetch origin "pull/${id}/head:${branch}" }
function sidetree { git worktree add ../$args }
function add { git add $args }
function unstage { git reset HEAD -- $args }
function amend { git commit --amend $args }
function commit { git commit $args }
function pull { git pull $args }
function push { git push $args }
function merge { git merge $args }
function rebase { git rebase $args }
function stashed { git stash list $args }
function save { git stash save $args }
function apply { param($index) git stash apply stash@`{${index}`} }
function drop { param($index) git stash drop stash@`{${index}`} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment