-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
43 lines (41 loc) · 1.27 KB
/
aliases
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
41
42
43
# BSD `which -s` that works on Linux
alias whichs='which >/dev/null 2>&1'
# use hub git wrapper if available:
whichs hub && alias git=hub
# git-related aliases
alias clone='git clone --recursive'
alias gdiff='git diff --color-words'
alias status='git status -uno'
alias commit='git commit'
alias checkout='git fuzzy-checkout'
alias branch='git checkout -b'
alias amend='git commit --amend'
alias aamend='git commit -a --amend --no-edit'
alias push='git push'
alias pull='git pull'
alias fetch='git fetch'
alias remote='git remote add'
alias cherry='git cherry-pick'
alias pick='git cherry-pick'
alias submodule='git submodule init && git submodule update'
alias m='git checkout $(git default-branch)'
alias mp='git checkout $(git default-branch) && git pull'
alias b="git checkout -b"
alias ci='git commit'
alias c="git fuzzy-checkout"
alias co="git fuzzy-checkout"
alias c-="git-last-branch"
alias uncommit="git log -1 && git reset HEAD^1"
alias rebase='git rebase -i origin/$(git default-branch)'
alias rbc='git rebase --continue'
alias fork='gh repo fork --remote --remote-name mine'
alias pm='git push mine'
alias gitx='open -a Fork .'
alias git-cpr='gh pr checkout'
function pr () {
if [[ -z $(git remote | grep mine) ]]; then
fork
fi
git push -u mine
gh pr create --web "$@"
}