Slide 1

Slide 1 text

ൿ఻ͷ gitconfig & ෇͚߹Θͤୡ 2019.06.15 # shinjukult @to4iki 1

Slide 2

Slide 2 text

About Me • Takezawa Toshiki • @to4iki • iOS/Swift  2

Slide 3

Slide 3 text

Agenda 1. ఱԼҰ gitconfig େձ 2. tigΔ 3. tips ! 3

Slide 4

Slide 4 text

1. ఱԼҰ gitconfig େձ 4

Slide 5

Slide 5 text

جຊํ਑: ͱʹ͔͘গͳ͍ίϚϯυͰ! 5

Slide 6

Slide 6 text

gitconfig https://github.com/to4iki/dotfiles/blob/master/git/gitconfig [alias] br = branch --verbose --verbose --color --sort=-authordate co = checkout c = commit -av d = diff --histogram f = fetch g = grep -n -p --color --heading --break l = log --oneline n = now --all --stat s = status -sb undo = reset --soft HEAD~ o = browse copr = !git fetch origin pull/${1}/head:pr/${1} && git checkout pr/${1} fpush = push --force-with-lease 6

Slide 7

Slide 7 text

ҰจࣈΤΠϦΞε https://github.com/to4iki/dotfiles/blob/master/fish/config.fish alias git 'hub' alias g 'git' alias s 'git s' alias b 'git br' alias m 'git co master' alias d 'git d' alias gg 'git g' alias t 'tig' alias ta 'tig --all' 7

Slide 8

Slide 8 text

2. tigΔ 8

Slide 9

Slide 9 text

Tig - text-mode interface for git https://github.com/jonas/tig 9

Slide 10

Slide 10 text

tig • ৭ʑGUIͷgitΫϥΠΞϯτ࢖͚ͬͨͲɺϝΠϯ͸tig • ࠩ෼ݟ͍͚ͨ࣌ͩGUIΫϥΠΞϯτ࢖͏͜ͱ΋͋Δ • ଟ෼ͳΜͰ΋Ͱ͖Δ • CUIͳͷͰͦΓΌಈ࡞͸ૣ͍ 10

Slide 11

Slide 11 text

tig ͷ ࢖༻ྫͷલʹɺ 11

Slide 12

Slide 12 text

hub https://hub.github.com/ GitHubΛCUI͔Βѻ͏͜ͱ͕Ͱ͖Δ 12

Slide 13

Slide 13 text

whichpr https://github.com/pocke/whichpr commit hash ͔Β֘౰͢ΔPRΛ୳ࡧ͠ɺGitHub্ͷϖʔδΛදࣔ͢Δ 13

Slide 14

Slide 14 text

tigrc https://github.com/to4iki/dotfiles/blob/master/etc/tigrc # Alias ... bind generic y @sh -c "echo %(commit) | pbcopy" bind main B !@hub browse -- commit/%(commit) bind status B !@hub browse -- blob/master/%(file) bind main D !@hub compare %(commit)...%(branch) bind refs D !@hub compare master...%(branch) bind main P !@whichpr open %(commit) bind blame P !@whichpr open %(commit) bind main R !git rebase -i %(commit) 14

Slide 15

Slide 15 text

3. tips 15

Slide 16

Slide 16 text

pecoselectghq_repository https://github.com/yoshiori/fish-pecoselectghq_repository • cloneͨ͠ϦϙδτϦͷΠϯΫϦϝϯλϧαʔν 16

Slide 17

Slide 17 text

fishpecoselect_branch https://github.com/to4iki/fishpecoselect_branch • ϩʔΧϧʹ࡞੒ͨ͠branchͷΠϯΫϦϝϯλϧαʔν 17

Slide 18

Slide 18 text

git-update https://github.com/to4iki/dotfiles/blob/master/bin/git-update git checkout master git pull --ff git checkout topic_branch git rebase master ΛҰൃͰߦ͏αϒίϚϯυ 18

Slide 19

Slide 19 text

git-now https://github.com/iwata/git-now 19

Slide 20

Slide 20 text

Recap • Ҏલ͸΋ͬͱΰϦΰϦ͕ͩͬͨɺ3,4೥͔͚ͯચ࿅͞Ε͖ͯͨ • 1จࣈΤΠϦΞε͍͍ͧ 20

Slide 21

Slide 21 text

ࣗ෼͚ͩͷൿ఻ͷ gitconfig Λҭͯɺ ެ։͍ͯ͜͠͏ʂ 21

Slide 22

Slide 22 text

Thanks 22