summaryrefslogtreecommitdiff
path: root/git_alias
blob: 1fb743e86a0b7dccb1ed84f3e4598b1c1ef3d7f5 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
alias gb='git branch'
alias gba='gb -a'
alias gco='git checkout'
alias gcob='gco -b'

alias ga='git add'
alias gd='git diff'
alias gdc='git diff --cached'
alias gc='git cherry-pick'
alias gl='git log '
alias glo='gl --oneline'
alias glome='glo --author=viresh'
alias glomepmbl='glo --author=viresh pm/bleeding-edge'
alias glomepmln='glo --author=viresh pm/linux-next'
alias glomeln='glo --author=viresh lnext/master'
alias glomeo='glo --author=viresh origin/master'
alias glogme='glo --grep=viresh'
alias glor='glo --reverse'
alias gloo='gl --pretty=onelin'
alias glf='gl --pretty=fixes'
glfs() { glf $1 | head -1; }
alias gls='gl --stat'
alias glsp='gls -p'
alias glspr='glsp --reverse'
alias glspme='glsp --author=viresh'
alias gs='git status'
alias gsh='git show --stat -p'
alias gshf='git show --format= --name-only'
alias gca='git commit --amend'
alias gcf='git commit --fixup'
alias gcs='git commit -s'
alias gcsa='git -c gerrit.createChangeId=true commit -s'
alias gcsm='git commit -s -m'
alias tgca='GIT_EDITOR=cat gca'
alias tgrevert='GIT_EDITOR=cat git revert -s'
alias gcah='gca -C HEAD'
alias gcara='gcah --reset-author'
alias gcdc='git commit --date="`date`" -c '
alias gampcp='mv /media/psf/Home/Documents/[1-9].txt ~/Downloads/patches/'
alias gamp='git am -3 ~/Downloads/patches/*'
alias cgamp='dos2unix ~/Downloads/patches/*'
alias dgamp='rm -rf ~/Downloads/patches/*'
alias mgamp='git am -s -3 ~/scripts/mutt/incoming/*.mbox'


alias gr='git rebase -i'
alias tgr='GIT_EDITOR=cat gr'
alias gra='gr --autosquash'
alias tgra='GIT_EDITOR=cat gra'
alias gro='gr origin/master'
alias grao='gra origin/master'
alias graom='gra origin/main'
alias grh='git reset --hard '
alias grhm='git reset --hard origin/master'
alias grhmm='git reset --hard origin/main'
alias grs='git rebase --skip'
alias grc='git rebase --continue'
alias tgrc='GIT_EDITOR=cat grc'
alias gclean='rm -rf `pwd`/*; grh HEAD'

alias grv='git remote -v'

alias gf='git fetch -p'
alias gfo='gf -p origin'
alias gfs='gf -p self'
alias gp='git push -f'
alias gp='git push -f'
alias gpa='git push --mirror'
alias gerritpush='git push aosp HEAD:refs/for/android-4.9'
alias gpo='gp origin '
alias gpl='gp linaro '
alias gps='git push self --mirror'
alias gpoppnext='gp pmko opp/linux-next:opp/linux-next'
alias gpoppbl='gp pmko opp/linux-next:opp/bleeding-edge'
alias gpcfnext='gp pmko cpufreq/arm/linux-next:cpufreq/arm/linux-next'
alias gpcfbl='gp pmko cpufreq/arm/linux-next:cpufreq/arm/bleeding-edge'

alias ggrep='git grep'
alias gk='gitk --all -100&'

alias cpatch='scripts/checkpatch.pl --strict'
alias cpatcha='cpatch *.patch'
alias gpatch='git format-patch -C -M --thread=shallow'
alias gpatchc='gpatch --cover-letter'
gpatchs() { gpatch --subject-prefix="PATCH V$1" $2; }
gpatchcs() { gpatchc --subject-prefix="PATCH V$1" $2; }
gpatchcb() { gpatchc --base=$1 $2; }
gpatchcsb() { gpatchc --subject-prefix="PATCH V$1" --base=$2 $3; }
alias ph='gpatch HEAD^'
phc() { gpatch $1^..$1; }
rpull() { git request-pull remotes/linux-linaro/linux-linaro-core-tracking git://git.linaro.org/arm/big.LITTLE/mp.git $1 > ../pull.txt; cat ../pull.txt; }
rpullcfnext() { git request-pull pm/linux-next git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/arm/linux-next > ~/junk/pull.txt; cat ~/junk/pull.txt; }
rpullopp() { git request-pull origin/master git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next > ~/junk/pull.txt; cat ~/junk/pull.txt; }
rpulloppnext() { git request-pull pm/linux-next git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next > ~/junk/pull.txt; cat ~/junk/pull.txt; }


alias gitgetcclist='for i in `cat ../test`; do gls HEAD~200.. -- $i > ../pull.txt;echo $i; cat ../pull.txt | grep -e Acked -e Cc | sort -u; echo ""; done | less'

alias mmcmail='git send-email --to=linux-mmc@vger.kernel.org'
alias armmail='git send-email --to=linux-arm-kernel@lists.infradead.org '
#rmk patch tracker mail
alias armpatchmail='git send-email --to=patches@arm.linux.org.uk'

alias linarorebase='/home/vireshk/scripts/linarorebase.sh rebase'
alias linaroclrrebase='/home/vireshk/scripts/linarorebase.sh clear_rebase'
alias linaropush='/home/vireshk/scripts/linarorebase.sh push'
alias linarostat='/home/vireshk/scripts/linarorebase.sh stat'
alias linarocheck='/home/vireshk/scripts/linarorebase.sh check'
#alias mypatchcountrank='gl --no-merges --format="%aN" v3.12..lnext/master | sort | uniq -ic| sort -nr | less'
#alias mypatchcount='glo  --author=viresh --no-merges origin/master | wc -l'
mypatch() { glo  --author=viresh --no-merges $1 ; }
mypatchcount() { glo  --author=viresh --no-merges $1 | wc -l; }
mypatchcountrank() { gl --no-merges --format="%aN" $1..$2 | sort | uniq -ic| sort -nr | less; }

#Other tools
alias myspatch='echo "spatch -in_place -include_headers -sp_file setmode.cocci -dir drivers/"'

# Gitmail
alias gitmail='git send-email *.patch --cc vireshk'
alias gitmailsuppress='git -c sendemail.tocmd=true send-email *.patch --suppress-cc=all --cc vireshk'
alias gitmailpmbase='gitmail --cc pm --cc vingu'
alias gitmailpm='gitmailpmbase --to rafael'
alias gitmailpmrust='gitmailpm --cc sboyd --cc "Nishanth Menon <nm@ti.com>" --to "Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>" --cc rust-for-linux@vger.kernel.org --cc "Manos Pitsidianakis <manos.pitsidianakis@linaro.org>" --cc "Erik Schilling <erik.schilling@linaro.org>" --cc "Alex Bennée <alex.bennee@linaro.org>" --cc "Joakim Bech <joakim.bech@linaro.org>" --cc "Rob Herring <robh@kernel.org>"'
alias gitmailopp='gitmailpmbase --cc rafael --cc sboyd --cc "Nishanth Menon <nm@ti.com>"'
alias gitmailschedutil='gitmailpm --to ingo --to peterz --cc vingu'
alias gitmailstratos='gitmail -cc vingu --cc "Alex Bennée <alex.bennee@linaro.org>" --cc "Manos Pitsidianakis <manos.pitsidianakis@linaro.org>"'
alias gitmailgenpd='gitmailopp --to ulf.hansson@linaro.org --to "Kevin Hilman <khilman@kernel.org>" --cc rnayak@codeaurora.org'
alias gitmailqemu='gitmailstratos --cc vingu --to qemu-devel@nongnu.org'
alias gitmailqemuvd='gitmailstratos --cc vingu --to qemu-devel@nongnu.org --to "virtio-dev@lists.linux.dev" --cc "Michael S. Tsirkin <mst@redhat.com>" --cc "Oleksandr Tyshchenko <olekstysh@gmail.com>" --cc "xen-devel@lists.xen.org" --cc "Andrew Cooper <andrew.cooper3@citrix.com>" --cc "Juergen Gross <jgross@suse.com>" --cc "Sebastien Boeuf <sebastien.boeuf@intel.com>" --cc "Liu Jiang <gerry@linux.alibaba.com>" --to "Stefan Hajnoczi <stefanha@redhat.com>"'


alias gitmailxen='gitmailstratos --to xen-devel@lists.xen.org --cc "Oleksandr Tyshchenko <olekstysh@gmail.com>" --to "Juergen Gross <jgross@suse.com>" --to "Julien Grall <julien@xen.org>" --to "Anthony PERARD <anthony.perard@citrix.com>"'

alias gitmailvirtiospec='gitmailstratos --to "virtio-comment@lists.linux.dev" --cc "Cornelia Huck <cohuck@redhat.com>", --cc "\"Michael S. Tsirkin\" <mst@redhat.com>"'

alias gitmailgpiod='gitmail --cc vingu --to "Linus Walleij <linus.walleij@linaro.org>" --to "Bartosz Golaszewski <brgl@bgdev.pl>" --cc "linux-gpio@vger.kernel.org" --cc vingu --cc "Kent Gibson <warthog618@gmail.com>"'
alias gitmailgpiodrust='gitmailstratos --to "Linus Walleij <linus.walleij@linaro.org>" --to "Bartosz Golaszewski <brgl@bgdev.pl>" --cc "linux-gpio@vger.kernel.org"'

# fetch remotes
alias gitsyncpmko='ssh git@gitolite.kernel.org track fetch pub/scm/linux/kernel/git/vireshk/pm.git next;ssh git@gitolite.kernel.org track fetch pub/scm/linux/kernel/git/vireshk/pm.git linus;'
alias gitsynclko='ssh git@gitolite.kernel.org track fetch pub/scm/linux/kernel/git/vireshk/linux.git next;ssh git@gitolite.kernel.org track fetch pub/scm/linux/kernel/git/vireshk/linux.git linus;'
alias gitsyncllo='ssh git@git.linaro.org track fetch people/viresh.kumar/mylinux.git lnext;ssh git@git.linaro.org track fetch people/viresh.kumar/mylinux.git linus;'
alias gitsyncko="cd /home/vireshk/work/repos/devel/linux/; gitsyncpmko gitsynclko"
alias gitsynclo="cd /home/vireshk/work/repos/devel/linux/; gitsyncllo"