Skip to content

Instantly share code, notes, and snippets.

@nkzsdy
Created February 27, 2019 12:19
Show Gist options
  • Save nkzsdy/0f5dfe92dd5cdfeaf3e3fa63a520c4b2 to your computer and use it in GitHub Desktop.
Save nkzsdy/0f5dfe92dd5cdfeaf3e3fa63a520c4b2 to your computer and use it in GitHub Desktop.
gitのブランチ一覧からインタラクティブに選択してcheckoutする
function gpeco
if [ -e .git ]
git checkout (git branch | peco | tr -d " ")
else
echo "[ERROR]: .git is not found."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment