Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[alias]
a = !git config --get-regexp alias
b = !git switch -c
br = !git switch -c origin/
s = !git status
sw = !git switch
swc = !git switch -c
swd = !git switch --detach
m = !git switch master
p = !git push
rv = !git remote -v
co = !git restore
ci = !git add * && git commit -m
r = !git rebase
rm = !git r master
rom = !git r origin master
branchname = !git rev-parse --abbrev-ref HEAD
pub = !git push -u origin $(git branchname)
bl = !git branch --all
pr = "!f() { exec vsts code pr \"$@\"; }; f"
repo = "!f() { exec vsts code repo \"$@\"; }; f"
log1 = !git log --oneline
prb = !git pr create --target-branch
prm = !git prb master --query pullRequestId
prmc = !git prm --auto-complete
prl = !git pr list --output table
prc = !git pr update --query status --auto-complete on --id
url = !git config --get remote.origin.url
execurlpr = "!f() { exec start msedge \"$@/pullrequests?_a=mine\"; } ; f"
execurl = "!f() { exec start msedge \"$@\"; } ; f"
webpr = !git execurlpr $(git url)
web = !git execurl $(git url)
prs = !git pr show --query status --id
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
ignorevs = !git ignore visualstudio >> .gitignore
ignorepy = !git ignore python >> .gitignore
updategitignore = "!f() { exec ifix gitignore -m -f;}; f"
b2texec = "!f() { git tag \"$@\" refs/heads/\"$@\" && git branch -d \"$@\"; }; f"
b2t = !git tag $@ refs/heads/$@ && git branch -D $@ && :
t2b = !git switch --detach $@ && git switch -c $@ && git tag -d $@ && :
listgits = !python listgits $@
lg = !git listgits $@
rclean = !git reflog expire --expire-unreachable=now --all && git gc --prune=now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.