-
Notifications
You must be signed in to change notification settings - Fork 0
/
_bashrc.mingw
40 lines (36 loc) · 1.02 KB
/
_bashrc.mingw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# _bashrc.mingw
# Avoid using my monstrous .bashrc in MINGW environments
# Modified: Wed 13 Feb 2019 14:00:47 (Bob Heckel)
set -o vi
alias ..='cd ..'
alias by=exit
alias cod='git checkout develop'
alias f=fg
alias h='history|tail -n20'
# alias gb='git branch -v; echo "MRU:"; git for-each-ref --sort=-committerdate refs/heads/ --format="%(committerdate:short) %(authorname) %(refname:short)" | head -n5'
alias gb='git branch'
alias gpull='git pull'
alias gpush='git push'
alias gs='git status'
alias gsl='git stash list'
bak() {
cp -iv ${1} ${1}.bak
}
# Git Log
gl() {
# e.g. gl mybranch 20
local branch=$1
test "x$branch" = "x" && branch='CURRENT BRANCH'
local days=$2
test "x$days" = "x" && days=25
git log --pretty=format:"%Cblue%h %ar |%Cgreen %s%Cblue %d [%an]" \
--graph \
--date=short $1 \
|sed "s/^\* //g" \
|head -n$days; \
echo -n; echo; echo "${fg_darkgray} ...displaying last $days $branch";
}
rmv() {
mkdir --parent /c/temp
mv "$1" /c/temp
}