Save 37% off PRO during our Black Friday Sale! »

社会で生き残るためのgit

011714704c4a925e542d426d4cdaa4e3?s=47 giginet
July 14, 2018

 社会で生き残るためのgit

未来大×企業エンジニア 夏の大LT大会

https://fun.connpass.com/event/91930/

紹介しているdotfiles
https://github.com/giginet/castle

011714704c4a925e542d426d4cdaa4e3?s=128

giginet

July 14, 2018
Tweet

Transcript

  1. ࣾձͰੜ͖࢒ΔͨΊͷ git @giginet

  2. ୭ʁ • @giginet (Twitter/GitHub) • ΫοΫύουɹٕज़෦ϞόΠϧج൫άϧʔϓ • iOSج൫։ൃ • ๺ւಓവؗࢢग़਎ɺ๺େ

    • iOSDCͰ࿩͠·͢
  3. ࣾձ #ͱ͸

  4. None
  5. None
  6. None
  7. None
  8. ࣾձ w ͱʹ͔͘ڊେͳίʔυϕʔε w ୭͕ॻ͍͔ͨΘ͔Βͳ͍ίʔυ w ҙਤͷΘ͔Βͳ͍มߋ w ແݶʹίϯϑϦΫτ͢ΔϑΝΠϧ w

    มߋ͠ͳ͍ͱ͍͚ͳ͍ϓϩδΣΫτଟ਺ w ϓϥΠϕʔτͱͷཱ྆
  9. ࣾձ w ͱʹ͔͘ڊେͳίʔυϕʔεˠHSFQ͠·͘Γ w ୭͕ॻ͍͔ͨΘ͔Βͳ͍ίʔυˠCMBNF͠·͘Γ w ҙਤͷΘ͔Βͳ͍มߋˠ13୳͠·͘Γ w ແݶʹίϯϑϦΫτ͢ΔϑΝΠϧˠSFCBTF͠·͘Γ w

    มߋ͠ͳ͍ͱ͍͚ͳ͍ϓϩδΣΫτଟ਺ˠDMPOF͠·͘Γ w ϓϥΠϕʔτͱͷཱ྆
  10. ࠓ೔͔Β࢖͑Δgitज़

  11. Φεεϝgit Utility • tig • hub • ghq • gibo

    • git-user
  12. jonas/tig • CLIͰಈ͘άϥϑΟΧϧͳgitΫϥΠΞϯτ • ػೳͱγϣʔτΧοτ๛෋ • log, status, blame, grep

    • ΧελϚΠζ΍֦ு΋Մೳ • ͜Ε͕ͳ͍ͱ࢓ࣄͰ͖ͳ͍
  13. None
  14. None
  15. .tigrc • tigrcͰศརίϚϯυ֦ுྫ • ίϛοτϋογϡΛίϐʔ • ίϛοτͱHEADͱͷcompareΛϒϥ΢βͰ։͘ • ࢦఆͨ͠ίϛοτ͔Βrebase -i

    • blameͰબ୒ͨ͠ߦͷมߋΛؚΉPRΛ୳͖ͯͯ͠ϒϥ΢β Ͱ։͘
  16. None
  17. github/hub • gitʹGitHub APIΛѻ͏ͨΊͷศརαϒίϚϯυ͕૿͑Δ • GHEͰ΋࢖͑Δ $ git create #

    GitHubʹϦϙδτϦ࡞੒ $ git fork # fork͢Δ $ git browse # ϒϥ΢βͰ։͘ $ git pull-request # ΤσΟλ͕։͍ͯPRૹΕΔ
  18. simonwhitaker/gibo • .gitignoreͷςϯϓϨʔτউखʹੜ੒ͯ͘͠ΕΔౕ • ϓϩδΣΫτͷbootstrapʹศར $ gibo Swift > .gitignore

  19. motemen/ghq • cloneͨ͠ϦϙδτϦΛҰׅ؅ཧ • GHEʹ΋ରԠ $ ghq get apple/Swift $

    ghq look apple/Swift
  20. gesquive/git-user • authorઃఆΛϓϩδΣΫτ͝ͱʹ੾Γସ͑ΕΔ΍ͭ • ࣾ಺ͷίʔυͱOSSͰAuthorΛม͍͑ͨͱ͖ʹศར

  21. IncludeIf(.gitconfig) • ಛఆͷσΟϨΫτϦύε͚ͩઃఆΛม͑Δ • ࢓ࣄ༻ͱOSS༻ʹΘ͚͓ͯ͘ͱศར • ghqͱซ༻ͯ͠ghqͷύεҎԼͰઃఆΛม͑Δ [includeIf "gitdir:~/.ghq/github.com/"] path

    = ~/.gitconfig.public [includeIf "gitdir:~/.ghq/github.com/cookpad/"] path = ~/.gitconfig.work
  22. $ vim Snippet.swift $ git init $ gibo Swift >

    .gitignore $ git user set giginet $ tig status $ git create $ git push -u origin master ৽نϓϩδΣΫτ࡞੒
  23. $ ghq get apple/Swift $ ghq look apple/Swift $ git

    fork $ git checkout -b feature … $ git push -u giginet feature $ git pull-request γϡοͱPRૹΔ
  24. .gitconfig • aliasͰ͍Ζ͍ΖͰ͖Δ # aliasషΔ͚ͩ cp = cherry-pick # Shell

    Script࣮ߦ st = !"tig status" # Ҿ਺Λ౉͢ gsub = !"f() { git grep -l \"$1\" | xargs sed -i '' - e \"s/$1/$2/g\"; }; f"
  25. .gitconfig • ΅͘ͷ͔Μ͕͍͖͑ͨ͞ΐ͏ͷΤΠϦΞεྫ • git gsub <regexp> <replace> • ϦϙδτϦ಺ͷશͯΛਖ਼نදݱஔ׵

    • git delete-merged • mergeࡁΈͷෆཁͳϒϥϯνΛҰׅ࡟আ • git open-branch • ݱࡏͷϒϥϯν͔Βग़ͨ͠PRΛϒϥ΢βͰ։͘ • https://github.com/giginet/castle/blob/master/home/.gitconfig
  26. ·ͱΊ • ࣾձͰੜ͖ൈͨ͘Ίʹ͸εϐʔυײ • Shell/NeoVimฤ΋͍͔ͭ΍Γ͍ͨ • ࠓճ঺հͨ͠dotfiles • https://github.com/giginet/castle/blob/master/ home/.gitconfig

    • https://github.com/giginet/castle/blob/master/home/.tigrc
  27. ࣾձΛମݧ https://info.cookpad.com/pages/ new_graduates_recruitment

  28. None
  29. ͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠