Skip to content

Instantly share code, notes, and snippets.

@ArnoldZokas
Last active November 7, 2017 13:42
Show Gist options
  • Save ArnoldZokas/5578616 to your computer and use it in GitHub Desktop.
Save ArnoldZokas/5578616 to your computer and use it in GitHub Desktop.
function GitPull { git pull }
Set-Alias p GitPull
function GitCheckout($branchName) { git checkout $branchName }
Set-Alias co GitCheckout
function GitDeleteBranch($branchName) { git branch -D $branchName }
Set-Alias whack GitDeleteBranch
function GitCherryPick($branchName) { git cherry-pick $branchName }
Set-Alias cherry GitCherryPick
function GitStatus { git status }
Set-Alias s GitStatus
function GitPrettyLog { git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit }
Set-Alias lsd GitPrettyLog
function GitPrettyLogNewCommits { git log origin/master..HEAD --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit }
Set-Alias wtf GitPrettyLogNewCommits
function GitDiff { git difftool }
Set-Alias d GitDiff
function GitAddAll { git add . | git add -u }
Set-Alias aa GitAddAll
function GitAddInteractive { git add -i }
Set-Alias ai GitAddInteractive
function GitCommit($message) { git commit -m "$message" }
Set-Alias c GitCommit
function GitPush { git push }
Set-Alias go GitPush
function GitResetHard {
git reset --hard
git clean -f -d
write-host ""
write-host " __,-~~/~ `---. "
Write-Host " _/_,---( , ) "
write-host " __ / < / ) \___ "
write-host " ====------------------===;;;== "
write-host " \/ ~ ~ ~ ~ ~ ~\~ ~)~ ,1/ "
write-host " (_ ( \ ( > \) "
write-host " \_( _ \< >_>' "
write-host " ~ `-i' ::>/--' "
write-host " I;|.|.| "
write-host " <|i::|i|> "
write-host " |[::|.| "
write-host " ||: | "
write-host " _________________________GROUND ZERO___________________ "
write-host ""
}
Set-Alias nuke GitResetHard
# Load posh-git example profile
. '\\vmware-host\Shared Folders\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment