Skip to content

Instantly share code, notes, and snippets.

@yarick123
Forked from OsirisTerje/GitAliases
Created June 2, 2019 10:10
Show Gist options
  • Save yarick123/cc2f39c085710c12c90085254a36aa26 to your computer and use it in GitHub Desktop.
Save yarick123/cc2f39c085710c12c90085254a36aa26 to your computer and use it in GitHub Desktop.
[alias]
a = !git config --get-regexp alias
b = !git checkout -b
br = !git checkout -b origin/
s = !git status
m = !git checkout master
p = !git push
co = !git checkout
ci = !git add * && git commit -m
rm = !git rebase master
rom = !git rebase 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"
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
execurl = "!f() { exec start chrome \"$@/pullrequests?_a=mine\"; } ; f"
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
updategitignore = "!f() { exec ifix gitignore -m -f;}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment