From 450febbf5b471ca160663e3e37b925aaa353266c Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Fri, 13 May 2016 17:10:43 +0200 Subject: [PATCH] Better gitconfig --- .bash/aliases | 2 +- .dircolors => .dir_colors | 0 .git_template/hooks/ctags | 2 +- .gitconfig | 40 ++++++++++++++++++++++++--------------- 4 files changed, 27 insertions(+), 17 deletions(-) rename .dircolors => .dir_colors (100%) diff --git a/.bash/aliases b/.bash/aliases index 04632f0..a9a96f0 100644 --- a/.bash/aliases +++ b/.bash/aliases @@ -48,7 +48,7 @@ LS_COMMON="-hF" # Detect which `ls` flavor is in use if whence dircolors > /dev/null 2>&1; then # GNU `ls` - eval $(dircolors -b $HOME/.dircolors) + eval $(dircolors -b $HOME/.dir_colors) colorflag="--color" else # OS X `ls` #eval $(gdircolors $HOME/.dircolors) diff --git a/.dircolors b/.dir_colors similarity index 100% rename from .dircolors rename to .dir_colors diff --git a/.git_template/hooks/ctags b/.git_template/hooks/ctags index 1ac991e..d51e9af 100755 --- a/.git_template/hooks/ctags +++ b/.git_template/hooks/ctags @@ -2,7 +2,7 @@ set -e PATH="/usr/local/bin:$PATH" dir="`git rev-parse --git-dir`" -trap 'rm -f "$dir/$$.tags"' EXIT +trap 'rm -f "$dir/$$.tags"' EXIT INT TERM git ls-files | \ ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql mv "$dir/$$.tags" "$dir/tags" diff --git a/.gitconfig b/.gitconfig index 0901b62..e18437e 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,18 +1,20 @@ [init] templatedir = ~/.git_template +[branch] + autosetupmerge = always + autosetuprebase = always [core] - # Use custom `.gitignore` excludesfile = ~/.gitignore_global - # Treat spaces before tabs and all kinds of trailing whitespace as an error - # [default] trailing-space: looks for spaces at the end of a line - # [default] space-before-tab: looks for spaces before tabs at the beginning of a line whitespace = space-before-tab,-indent-with-non-tab,trailing-space - # utocrlf = input editor = git-editor.sh +# pager = less -S [color] - # Use colors in Git commands that are capable of colored output when - # outputting to the terminal. (This is the default setting in Git = 1.8.4.) ui = auto + diff = auto + status = auto + branch = auto + interactive = auto + grep = auto [color "branch"] current = yellow reverse local = yellow @@ -26,28 +28,36 @@ added = yellow changed = green untracked = cyan +[github] + user = jannikz +[interactive] + singlekey = true [help] - # Automatically correct and execute mistyped commands - autocorrect = 1 + autocorrect = 10 [diff] tool = git-difftool - # Detect copies as well as renames renames = copies prompt = false [difftool "git-difftool"] cmd = git-difftool.sh $LOCAL $REMOTE [merge] + summary = true tool = git-mergetool - # Include summaries of merged commits in newly created merge commit messages - log = true - prompt = false [mergetool "git-mergetool"] cmd = git-mergetool.sh $LOCAL $REMOTE $BASE $MERGED +[pull] + rebase = true [push] - default = simple + default = tracking +[rebase] + autosquash = true [apply] # Detect whitespace errors when applying a patch whitespace = fix +[web] + browser = dillo +[browser "dillo"] + path = open [alias] # View abbreviated SHA, description, and history graphs lg = !"git lg1" @@ -100,7 +110,7 @@ co = checkout cobr = checkout -b root = rev-parse --show-toplevel - ctags = !.git/hooks/ctags + ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" [include] # Local/private config goes in the include path = ~/.gitconfig_local -- 2.43.0