-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
29 lines (28 loc) · 1.74 KB
/
makefile
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
install:
git config --global alias.a 'add'
git config --global alias.amend 'commit --amend'
git config --global alias.aliases 'config --get-regexp alias'
git config --global alias.b 'branch'
git config --global alias.ball 'branch --all'
git config --global alias.brnach 'branch'
git config --global alias.c 'commit'
git config --global alias.clear '!clear && ls && git status'
git config --global alias.co 'checkout'
git config --global alias.d 'diff'
git config --global alias.drop 'checkout --'
git config --global alias.f 'fetch'
git config --global alias.graph 'log --oneline --graph --decorate'
git config --global alias.last 'log HEAD~1..HEAD --oneline'
git config --global alias.lastdiff 'diff HEAD~1 HEAD'
git config --global alias.list 'log --oneline'
git config --global alias.mastiff 'log --oneline main..HEAD'
git config --global alias.new 'checkout -b'
git config --global alias.pr '! git pullrequest'
git config --global alias.pullrequest '! string=$$(git branch|grep "*");current_branch=$${string#"* "};url=$$(git remote get-url origin);if [[ $$url = *"github"* ]];then url=$$(echo $$url|sed s/\.git$$//);final_url="$$url/compare/$$current_branch";open "$${final_url}";fi;if [[ $$url = *"bitbucket"* ]];then final_url="$${url}/pull-requests/new?source=$${current_branch}&t=1";open $$final_url;fi'
git config --global alias.remain '! _current="$$(git symbolic-ref --short -q HEAD)" && git checkout main && git pull && git checkout $$_current && git rebase main'
git config --global alias.rename 'branch -m'
git config --global alias.s '! git clear'
git config --global alias.stage 'add'
git config --global alias.unamend 'reset --soft HEAD@{1}'
git config --global alias.uncommit 'reset HEAD~1 --soft'
git config --global alias.unstage 'reset'