秘伝の `gitconfig`

3925ee6eaa41031bac799de0f4f528ec?s=47 to4iki
June 15, 2019

秘伝の `gitconfig`

3925ee6eaa41031bac799de0f4f528ec?s=128

to4iki

June 15, 2019
Tweet

Transcript

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

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

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

    3
  4. 1. ఱԼҰ gitconfig େձ 4

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

  6. 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
  7. ҰจࣈΤΠϦΞε 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
  8. 2. tigΔ 8

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

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

  11. tig ͷ ࢖༻ྫͷલʹɺ 11

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

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

  14. 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
  15. 3. tips 15

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

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

  18. 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
  19. git-now https://github.com/iwata/git-now 19

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

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

  22. Thanks 22