Last active
August 19, 2019 21:36
-
-
Save rockfordlhotka/279bf4224e50cafe07b2b58a6bfcdd4a to your computer and use it in GitHub Desktop.
git bash aliases and more
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
#!/bin/bash | |
PATH=$PATH:"/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin" | |
alias az='winpty az.cmd' | |
alias minikube='winpty minikube.exe' | |
alias powershell='winpty powershell.exe' | |
alias ps1='winpty powershell.exe' | |
alias drme="docker.exe image ls | awk '/<none>/ { print $3}' | xargs docker.exe image rm -f" | |
alias cf='winpty cf.exe' | |
alias python='winpty python' | |
alias la='ll -a' | |
alias nw='start "" "C:/Program Files/Git/git-bash.exe"' | |
alias docker='winpty docker' | |
alias msbuild='winpty msbuild.exe' | |
alias nuget='winpty /c/src/rdl/csla/NuGet/Tools/NuGet.exe' | |
source ~/.oh-my-git-aliases | |
alias mkstart='~/mkstart.sh' | |
alias mkstop='~/mkstop.sh' | |
alias code='code-insiders' |
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
alias g='git' | |
alias gst='g status' | |
alias gfe='g fetch' | |
alias gco='g checkout' | |
alias gcd='gco develop' | |
alias gcm='gco master' | |
alias ggpush='g push origin $(current_branch)' | |
alias ggpushf='ggpush --force-with-lease' | |
alias ggpusht='g push origin --tags' | |
alias gc='g commit' | |
alias gc!='gc --amend' | |
alias gca='gc -a' | |
alias gca!='gca --amend' | |
alias gl='g pull' | |
alias glr='gl --rebase' | |
alias glff='gl --ff-only' | |
alias gm='g merge' | |
alias gmff='gm --ff-only' | |
alias gmnff='gm --no-ff' | |
alias ga='g add' | |
alias gap='ga --patch' | |
alias gai='ga -i' | |
alias gb='g branch' | |
alias gba='g branch -a' | |
alias ggr='git grep' | |
alias grb='g rebase' | |
alias grbi='grb --interactive' | |
alias grbiod='grbi origin/develop' | |
alias grbiom='grbi origin/master' | |
alias grbc='grb --continue' | |
alias grba='grb --abort' | |
alias gt='g tag' | |
alias gre='g reset' | |
alias greh='gre --hard' | |
alias ggrh='greh origin/$(current_branch)' | |
grf() { | |
gre @~ "$@" && gc! --no-edit | |
} | |
alias gd='g diff' | |
alias gdo='gd origin/$(current_branch) $(current_branch)' | |
alias gcp='g cherry-pick' | |
alias gcpa='gcp --abort' | |
alias gcpc='gcp --continue' | |
alias gsts='git stash show --text' | |
alias gsta='g stash' | |
alias gstp='gsta pop' | |
alias gstd='gsta drop' | |
alias gcl='g clone' | |
alias gr='g remote' | |
# https://github.com/robbyrussell/oh-my-zsh | |
function current_branch() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(git rev-parse --short HEAD 2> /dev/null) || return | |
echo ${ref#refs/heads/} | |
} |
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
winpty minikube start --vm-driver hyperv --hyperv-virtual-switch "Default Switch" --cpus 6 --memory 4096 |
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
minikube ssh "sudo poweroff" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment