From d8ac3708527c485cf474485e7146e386bd1cabc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sat, 14 Oct 2017 11:13:11 +0200 Subject: [PATCH] Adding git config --- git/gitconfig | 47 ++++++++++++++++++++++++++++++++++++++++++++ git/gitignore_global | 38 +++++++++++++++++++++++++++++++++++ git/setup.sh | 16 +++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 git/gitconfig create mode 100644 git/gitignore_global create mode 100755 git/setup.sh diff --git a/git/gitconfig b/git/gitconfig new file mode 100644 index 0000000..0fa1801 --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,47 @@ +[user] + name = Thomas Lovén + email = thomasloven@gmail.com +[credential] + helper = cache +[color] + ui = auto + branch = auto + diff = auto + status = auto +[color "branch"] + current = yellow reverse + local = yellow + remote = green +[color "diff"] + meta = yellow + frag = magenta + old = red + new = green +[color "status"] + added = yellow + changed = green + untracked = cyan + +[push] + default = current +[core] + pager = less -F -X + +[alias] + st = status + ci = commit + co = checkout + di = diff + dc = diff --cached + wd = diff --word-diff=color + amend = commit --amend + aa = add --all + b = branch + updateall = submodule foreach 'git pull' + l = !prettygit + p = "!echo $PATH" + la = !git l --all + r = !git l -30 + ra = !git r --all +[merge] + tool = vimdiff diff --git a/git/gitignore_global b/git/gitignore_global new file mode 100644 index 0000000..7875fa7 --- /dev/null +++ b/git/gitignore_global @@ -0,0 +1,38 @@ +*.com +*.class +*.dll +*.exe +*.o +*.so + +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +*.log +*.sql +*.sqlite + +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Icon? +ehthumbs.db +Thumbs.db + +#Latex files +*.aux +*.bcf +*.blg +*.fdb_latexmk +*.fls +*.out + +tags diff --git a/git/setup.sh b/git/setup.sh new file mode 100755 index 0000000..8b9a4bb --- /dev/null +++ b/git/setup.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +function setup_git() +{ + brew install git + + cat << EOF > ${HOME}/.gitconfig +[include] + path = ${DOTFILES}/git/gitconfig +[core] + excludesfile = ${DOTFILES}/git/gitignore_global +EOF +} + +export DOTFILES=/Users/thomas/dotfiles +setup_git