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

git_peco_tips

Hiroki Kumamoto
June 09, 2015
26

 git_peco_tips

ミニ勉強会で話したgit + pecoのtips

Hiroki Kumamoto

June 09, 2015
Tweet

Transcript

  1. git ͷࠔΓ͝ͱ • ϒϥϯν͕૿͑Δͱิؒ΋ޮ͖ͮΒ͘ͳͬͯɺ
 git branch ͯ݁͠ՌΛίϐʔͯ͠git checkout ͯ͠...
 •

    cherry-pick͢Δͱ͖ʹίϛοτϋογϡίϐʔͯ͠
 ϖʔετͯ͠... ͳͲͳͲ
 • peco Λ͔ͭ͏ͱ͍͍ײ͡ʹ
  2. peco • https://github.com/peco/peco • Simplistic interactive filtering tool • emacs

    Ͱ͍͏anything (helm), macͰ͍͏spotlightͷshellͷ pipeͷ൛ • brew install peco
  3. ઃఆྫ1: ϒϥϯνʹνΣοΫΞ΢τ alias -g peco_branch='git branch | peco' alias -g

    git_checkout='git checkout `peco_branch`' ઃఆྫ2ɿcommitΛcherry-pick alias -g peco_commit='echo_first `git log —branches --no-merges --oneline | peco`' function echo_first { echo $1 }
 git_cherry-pick='git cherry-pick `peco_commit`'