blob: 7332ba169435404b8a7bc36e997be9e57ff2a110 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
# git.sh
# Craig Jennings <c@cjennings.net>
# git settings and convenience aliases, sourced by .profile
alias gitlog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gitstatus='git status -sb '
alias gitcom='git commit -m '
alias gitpp='git pull --prune ' # clean up any orphaned git objects
alias gittagbydate="git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags"
gitsp() {
git stash && git pull && git stash pop
}
gitck() {
git checkout "$(git branch --all | fzf| tr -d '[:space:]')"
}
gitdiff() {
preview="git diff $@ --color=always -- {-1}"
git diff "$@" --name-only | fzf -m --ansi --preview "$preview"
}
|