From ea1068689322a1f068d81abf1677a429e545fd8a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 15 Sep 2017 11:54:47 -0400 Subject: [PATCH] Support additional git aliases --- aliases.sh | 5 ++++- configs/shared/.gitconfig | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/aliases.sh b/aliases.sh index e00fefeeb..0ed3e1d34 100644 --- a/aliases.sh +++ b/aliases.sh @@ -59,14 +59,17 @@ fi # git-specific aliases git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"' -git config --global alias.today 'log --since=00:00:00 --all --no-merges --oneline --author="$(git config --get user.email)"' +git config --global alias.yday '! git log --name-only --since=yesterday.midnight --until=today.midnight --author="$(git config --get user.email)"' git config --global alias.conflicts 'diff --name-only --diff-filter=U' +alias gyday='git log --name-only --since=yesterday.midnight --until=today.midnight --author="$(git config --get user.email)"' + alias glp="git log --graph --pretty=format:'%Cred%h%Creset -%Cblue %an %Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" alias gprom="git pull --rebase origin master" alias gcan='git commit --amend --no-edit' alias gpf='git push --force' alias gds='git diff --staged' +alias gfx='git commit --fixup' # elixir-specific aliases diff --git a/configs/shared/.gitconfig b/configs/shared/.gitconfig index cd33cfa01..8d62d1e61 100644 --- a/configs/shared/.gitconfig +++ b/configs/shared/.gitconfig @@ -4,9 +4,10 @@ signingkey = C7A53CC58D3B1F8C [alias] recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format=\"%(refname:short)\" - today = log --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\" + today = ! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\" changed-files = conflicts = diff --name-only --diff-filter=U + yday = ! git log --name-only --since=yesterday.midnight --until=today.midnight --author=\"$(git config --get user.email)\" [commit] gpgsign = true [gpg] @@ -17,3 +18,4 @@ default = current [rebase] autosquash = true + autostash = true