File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 92
92
# ### ALIASES
93
93
[alias ]
94
94
p = " ! f(){ git push || (git pull && git push) ; }; f "
95
+ pu = " ! f() { if ! git is-clean; then git st; git pull; git pop; else git pull; fi ; }; f "
96
+ hard = " ! f() { git reset --hard origin/$( git current-branch) ; }; f "
95
97
a = add --all
96
98
m = commit --message
97
99
cam = " ! f(){ git add -A && git commit -m \" $@ \" ; }; f "
117
119
overwrite = ! git a && git amend && git force
118
120
merge-rebase = " ! f() { actual=$( git current-branch) && git checkout $1 && git rebase $actual && git force && git checkout $actual && git merge $1 ; }; f "
119
121
squash-branch = " ! f() { git reset $( git merge-base ${2:- master} $( git current-branch) ) ; git a ; git m ${1:- $(git log -1 --pretty=% B)} ; }; f "
120
- is-clean = " ! f() { if ! git diff --exit-code & > /dev/null || [[ ! -z " $( git ls-files --other --directory --exclude-standard) " ]]; then exit 1; fi ; }; f "
122
+ is-clean = " ! f() { if ! git diff --exit-code --quiet || [[ ! -z " $( git ls-files --other --directory --exclude-standard) " ]]; then exit 1; fi ; }; f "
121
123
message = "log -1 --pretty=%B"
122
124
c = "checkout -"
123
125
main = " ! f() { git remote show origin | sed -n ' /HEAD branch/s/.*: //p' ; }; f "
You can’t perform that action at this time.
0 commit comments