Inits work for git aliases
This commit is contained in:
parent
abdd2a5c0d
commit
8b545b771c
3 changed files with 15 additions and 3 deletions
|
@ -31,6 +31,7 @@ alias wdirs='dirs | tr " " "\n" | sort -r'
|
||||||
# GitHub integration
|
# GitHub integration
|
||||||
alias git=hub
|
alias git=hub
|
||||||
|
|
||||||
|
|
||||||
# Git aliases
|
# Git aliases
|
||||||
# List MRU branches
|
# List MRU branches
|
||||||
git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
|
git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
|
||||||
|
@ -38,6 +39,7 @@ git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate
|
||||||
# List today's work
|
# List today's work
|
||||||
git config --global alias.today 'log --since=00:00:00 --all --no-merges --oneline --author="$(git config --get user.email)"'
|
git config --global alias.today 'log --since=00:00:00 --all --no-merges --oneline --author="$(git config --get user.email)"'
|
||||||
|
|
||||||
|
|
||||||
# git commit --amend --no-edit
|
# git commit --amend --no-edit
|
||||||
alias gcan='git commit --amend --no-edit'
|
alias gcan='git commit --amend --no-edit'
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,17 @@ function wgbranch {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Outputs staged, unstaged, untracked files
|
||||||
|
# Similar to `git status` output but without the cruft
|
||||||
|
function wg-git-changed-files {
|
||||||
|
tracked_staged=$(git diff --name-only --staged)
|
||||||
|
tracked_unstaged=$(git diff --name-only)
|
||||||
|
untracked_unstaged=$(git ls-files --others --exclude-standard)
|
||||||
|
|
||||||
|
echo "${tracked_staged}\n${tracked_unstaged}\n${untracked_unstaged}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# git status "plumbing" version
|
# git status "plumbing" version
|
||||||
# Useful for piping into grep -> xargs git add
|
# Useful for piping into grep -> xargs git add
|
||||||
function wgst {
|
function wgst {
|
||||||
|
@ -91,7 +102,7 @@ function wgfcheckout {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# View an author's work within a specified date range.
|
# View an author's work within a specified date range.
|
||||||
function wgviewcommits {
|
function wgviewcommits {
|
||||||
author=$([ -z "$1" ] && echo "William Carroll" || echo "$1")
|
author=$([ -z "$1" ] && echo "William Carroll" || echo "$1")
|
||||||
todays_date=$(date +'%Y-%m-%d')
|
todays_date=$(date +'%Y-%m-%d')
|
||||||
|
@ -100,4 +111,3 @@ function wgviewcommits {
|
||||||
git log --all --author="${author}" --after="${date} 00:00" \
|
git log --all --author="${author}" --after="${date} 00:00" \
|
||||||
--before="${date} 23:59"
|
--before="${date} 23:59"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ source $HOME/pc_settings/functions/history_functions.sh
|
||||||
# custom functions to work with vim
|
# custom functions to work with vim
|
||||||
source $HOME/pc_settings/functions/vim_functions.sh
|
source $HOME/pc_settings/functions/vim_functions.sh
|
||||||
|
|
||||||
|
|
||||||
# generates placeholder content for FE work
|
# generates placeholder content for FE work
|
||||||
function lorem {
|
function lorem {
|
||||||
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||||
|
@ -49,4 +50,3 @@ function is_online {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue