-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathmac-bash-profile.txt
executable file
·37 lines (31 loc) · 1.31 KB
/
mac-bash-profile.txt
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
# mac-bash-profile.txt in https://github.com/wilsonmar/mac-install
# For paste into ~/.bash_profile
alias sbp='source ~/.bash_profile'
alias rs='exec -l $SHELL'
alias c="clear"
alias p="pwd"
alias dir='ls -alr'
alias ll='ls -FalhG'
alias gst='git status -s -b'
alias grm='git rm $(git ls-files --deleted)'
alias gb='git branch -avv'
function gd() { # get dirty
[[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*"
}
function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(gd)/"
}
alias get='git pull'
alias gf='git fetch;git diff master..origin/master'
alias gmo='git merge origin/master'
alias ga='git add .'
alias gc='git commit -m' # requires you to type a commit message
alias gl='clear;git status;git log --pretty=format:"%h %s %ad" --graph --since=1.days --date=relative;git log --show-signature -n 1'
alias gbs='git status;git add . -A;git commit -m"Update";git push'
function gas() { git status ; git add . -A ; git commit -m "$1" ; git push; }
alias gp='git push'
# https://github.com/barryclark/bashstrap/blob/master/.bash_profile
# For more Mac aliases, see https://gist.github.com/natelandau/10654137
# described at https://natelandau.com/my-mac-osx-bash_profile/
# https://github.com/clvv/fasd
# https://gist.github.com/pksunkara/988716