From 0055e568ac34dc10380bd5550e8be557f93802d0 Mon Sep 17 00:00:00 2001 From: Mark Norman Francis Date: Mon, 7 Aug 2017 11:44:09 +0100 Subject: [PATCH] Update git configuration --- etc/git/config | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ etc/git/ignore | 35 ++++++++++++++++++++++++++++++ gitconfig | 35 ------------------------------ 3 files changed, 94 insertions(+), 35 deletions(-) create mode 100644 etc/git/config create mode 100644 etc/git/ignore delete mode 100644 gitconfig diff --git a/etc/git/config b/etc/git/config new file mode 100644 index 0000000..2f04fe5 --- /dev/null +++ b/etc/git/config @@ -0,0 +1,59 @@ +# github:norm/homedir:etc/git/config +# +# Global user preferences for git. + +[github] + user = norm + +[user] + email = norm@201created.com + name = Mark Norman Francis + +[core] + whitespace = -trailing-space + +[color] + branch = auto + diff = auto + status = auto + ui = true + +[color "status"] + added = green + changed = magenta + untracked = cyan + +[merge] + ff = only + tool = opendiff + +[alias] + b = branch + br = "for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'" + cam = commit --amend + camn = commit --amend --no-edit + cf = commit --fixup + ci = commit -v + co = checkout + d = diff + dc = "diff --cached" + l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" + lm = ! git l | sed -e '/master)/,$d' + p = push + pf = push --force-with-lease + rba = "rebase --abort" + rbc = "rebase --continue" + rbi = "rebase -i" + s = "status -bs" + +[diff] + algorithm = patience + +[fetch] + prune = true + +[push] + default = simple + +[rebase] + autosquash = true diff --git a/etc/git/ignore b/etc/git/ignore new file mode 100644 index 0000000..afe0528 --- /dev/null +++ b/etc/git/ignore @@ -0,0 +1,35 @@ +# Files to ignore, taken from https://gist.github.com/octocat/9257657 + +# Compiled source +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages +# (it's better to unpack these files and commit the raw source +# git has its own built in compression methods) +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases +*.log +*.sql +*.sqlite + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 3cadadd..0000000 --- a/gitconfig +++ /dev/null @@ -1,35 +0,0 @@ -# github:norm/homedir:gitconfig -# -*- Mode: Apache; tab-width: 4; indent-tabs-mode: nil; -*- -# -# 'Global' user preferences for git. - -[github] - user = norm - token = REPLACE_ME_WITH_TOKEN - -[user] - email = norm@cackhanded.net - name = Mark Norman Francis - -[core] - whitespace = -trailing-space - -[color] - status = auto - diff = auto - branch = auto - -[merge] - tool = opendiff - -[alias] - br = branch - ci = commit - co = checkout - d = diff - dc = diff --cached - l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" - lo = "log --oneline" - p = push - rbi = "rebase -i HEAD~10" - s = status