Skip to content

Instantly share code, notes, and snippets.

@woodworker
Last active October 23, 2015 14:03
Show Gist options
  • Save woodworker/c48abbd5c654b8dec5c4 to your computer and use it in GitHub Desktop.
Save woodworker/c48abbd5c654b8dec5c4 to your computer and use it in GitHub Desktop.
fixed update and updatepush
[push]
default = simple
[pull]
rebase = true
[core]
excludesfile = ~/.gitignore
autocrlf = false
eol = lf
pager =
[alias]
st = status -sb
tags = tag -l
branches = branch -a
remotes = remote -v
aheadlog = !git --no-pager log origin/master..HEAD --pretty=oneline --abbrev-commit
aheaddiff = diff origin/master..HEAD
stagediff = diff --staged
standup = !git-standup
update = !test -z \"$(git status --porcelain -uno)\" && git pull || git stash -u && git pull && git stash pop
updatepush = !test -z \"$(git status --porcelain -uno)\" && git pull || git stash -u && git pull && git push && git stash pop
unadd = reset HEAD
mylog = !git log --author=\"$(git config --get user.name)\" --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(green)%Creset' --abbrev-commit
[help]
autocorrect = 1
[color]
ui = 1
#!/bin/bash
ALL_PARAMS=$@
function lastworkday()
{
if [[ -n "$ALL_PARAMS" ]]
then
echo "$ALL_PARAMS"
elif [[ "1" == "$(date +%u)" ]]
then
echo "last friday"
else
echo "yesterday"
fi
}
git log --since="$(lastworkday)" --author="$(git config --get user.name)" --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(green)%Creset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment