Skip to content

Instantly share code, notes, and snippets.

@gtcdevop
Created April 26, 2021 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtcdevop/16bf53cf4ece7fb283112a69f42856ed to your computer and use it in GitHub Desktop.
Save gtcdevop/16bf53cf4ece7fb283112a69f42856ed to your computer and use it in GitHub Desktop.
ALIAS gitconfig
[url "git@COMPANY.github.com"]
insteadOf = git@github.com
insteadOf = https://github.com/
[alias]
co = checkout
branchh = !git for-each-ref --sort='-authordate' --format='%(refname)%09%(authordate)' refs/heads | sed -e 's-refs/heads/--'
lg = log --all --graph --decorate --oneline --abbrev-commit
ppush = !git push origin `git branch --show-current`
ppull = !git pull origin `git branch --show-current`
cm = commit
ac = !git add -A && git commit
st = status -sb
tags = tag -l
branches = branch -a
remotes = remote -v
br = "!f() { git branch | grep -v HEAD | while read b; do git log --color --format=\"%ci _%C(magenta)%cr %C(bold cyan)$b%Creset %s %C(bold blue)<%an>%Creset\" $b | head -n 1; done | sort -r | cut -d_ -f2- | sed 's;origin/;;g' | head -10; }; f"
brr = "!f() { git fetch && git branch -r | grep -v HEAD | while read b; do git log --color --format=\"%ci _%C(magenta)%cr %C(bold cyan)$b%Creset %s %C(bold blue)<%an>%Creset\" $b | head -n 1; done | sort -r | cut -d_ -f2- | sed 's;origin/;;g' | head -10; }; f"
[IncludeIf "gitdir:~/pro/COMPANY/**"]
path = ~/COMPANY/.gitconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment