From 152a444bcad9f2af9915ec9502dd159f33113f93 Mon Sep 17 00:00:00 2001 From: Elijah Lazkani Date: Wed, 11 Jan 2017 18:33:21 -0500 Subject: [PATCH] Copying my git configuration --- salty/base/git/files/gitconfig | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/salty/base/git/files/gitconfig b/salty/base/git/files/gitconfig index 2f60f90..0f7ed18 100644 --- a/salty/base/git/files/gitconfig +++ b/salty/base/git/files/gitconfig @@ -1,3 +1,52 @@ +[core] + editor = emacs [user] email = EliaElLazkani@Gmail.com name = Elijah Lazkani +[push] + default = simple +[alias] + #Basics + s = status + cp = cherry-pick + st = status -s + cl = clone + ci = commit + co = checkout + cob = checkout -b + br = branch + diff = diff --word-diff + dc = diff --cached + ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat + lnc = log --pretty=format:"%h\\ %s\\ [%cn]" + lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short + # Relative Dates + ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative + le = log --oneline --decorate + # File log + fl = log -u + # Modified files in last commit + dl = "!git ll -1" + # Diff of last commit + dlc = diff --cached HEAD^ + # Find name of file + f = "!git ls-files | grep -i" + # Find string in file + grep = grep -Ii + gr = grep -Ii + # Get all aliases + la = "!git config -l | grep alias | cut -c 7-" + # Last tag + lasttag = describe --tags --abbrev=0 + lt = describe --tags --abbrev=0 + # Get current branch name + cb = rev-parse --abbrev-ref HEAD + # Pull from upstream + upstream = "!f() { \ + current_branch=$(git cb); \ + git co master && git fetch upstream && git merge upstream/master; \ + git co $current_branch; \ + }; f" +[color] + ui = true