Last active
October 23, 2015 14:03
-
-
Save woodworker/c48abbd5c654b8dec5c4 to your computer and use it in GitHub Desktop.
fixed update and updatepush
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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