Upgrade to Pro — share decks privately, control downloads, hide ads and more …

社会で生き残るためのgit

 社会で生き残るためのgit

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

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

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

giginet

July 14, 2018
Tweet

More Decks by giginet

Other Decks in Technology

Transcript

  1. github/hub • gitʹGitHub APIΛѻ͏ͨΊͷศརαϒίϚϯυ͕૿͑Δ • GHEͰ΋࢖͑Δ $ git create #

    GitHubʹϦϙδτϦ࡞੒ $ git fork # fork͢Δ $ git browse # ϒϥ΢βͰ։͘ $ git pull-request # ΤσΟλ͕։͍ͯPRૹΕΔ
  2. $ vim Snippet.swift $ git init $ gibo Swift >

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

    fork $ git checkout -b feature … $ git push -u giginet feature $ git pull-request γϡοͱPRૹΔ
  4. .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"
  5. .gitconfig • ΅͘ͷ͔Μ͕͍͖͑ͨ͞ΐ͏ͷΤΠϦΞεྫ • git gsub <regexp> <replace> • ϦϙδτϦ಺ͷશͯΛਖ਼نදݱஔ׵

    • git delete-merged • mergeࡁΈͷෆཁͳϒϥϯνΛҰׅ࡟আ • git open-branch • ݱࡏͷϒϥϯν͔Βग़ͨ͠PRΛϒϥ΢βͰ։͘ • https://github.com/giginet/castle/blob/master/home/.gitconfig