Skip to content

Instantly share code, notes, and snippets.

@rcmorano
Last active April 26, 2021 06:00
Show Gist options
  • Save rcmorano/5056379 to your computer and use it in GitHub Desktop.
Save rcmorano/5056379 to your computer and use it in GitHub Desktop.
my '.gitconfig' that uses https://github.com/SixArm/sixarm_git_gitconfig HOW TO USE: copy-paste to download: wget --no-check-certificate -O /tmp/gitconfig.zip "https://gist.github.com/rcmorano/5056379/download"; mv $(unzip /tmp/gitconfig.zip -d /tmp/|grep inflating.*gitconfig|awk '{print $NF}') ~/.gitconfig
[user]
name = Roberto C. Morano
email = rcmova@gmail.com
[include]
path = ~/.gitconfig.d/alias.txt
path = ~/.gitconfig.d/alias-for-cvs.txt
path = ~/.gitconfig.d/alias-for-gitk.txt
path = ~/.gitconfig.d/alias-for-rails.txt
path = ~/.gitconfig.d/alias-for-svn.txt
path = ~/.gitconfig.d/apply.txt
path = ~/.gitconfig.d/branch.txt
path = ~/.gitconfig.d/color.txt
path = ~/.gitconfig.d/core.txt
path = ~/.gitconfig.d/diff.txt
path = ~/.gitconfig.d/github.txt
path = ~/.gitconfig.d/merge.txt
path = ~/.gitconfig.d/mergetool.txt
path = ~/.gitconfig.d/push.txt
path = ~/.gitconfig.d/rerere.txt
path = ~/.gitconfig.d/user.txt
[alias]
st = status -sb
ci = commit -v
del = rm
branches = branch -a
switch = checkout
who = shortlog -s --
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
flog = log --name-only --pretty='\n%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short
vlog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen - %cD (%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative -p
slog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
search = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -"
# export to $1 which is supposed to be a dirname (it does the same as copying repo and removing .git)
export = "!sh -c 'git checkout-index -a -f --prefix=$1/' -"
last-commit-diff = diff HEAD^
delete-remote-branch = "!sh -c \"git push origin --delete $1\""
delete-branch = !git branch -D
cd = !bash -c 'while ! -d .git; do cd ..; done'
[core]
excludesfile = ~/.gitignore
[push]
default = simple
@DavidRogersDev
Copy link

This is quite nice. I did not know about the Six arm repo for git config. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment