Skip to content

Instantly share code, notes, and snippets.

@Islands5
Created February 3, 2018 14:01
Show Gist options
  • Select an option

  • Save Islands5/6551013dcee4cdbbfe802d4496481ca3 to your computer and use it in GitHub Desktop.

Select an option

Save Islands5/6551013dcee4cdbbfe802d4496481ca3 to your computer and use it in GitHub Desktop.
upstreamのプルリクをfetchのタイミングで取るようにする

これでgitコマンドのエイリアスを作成

git config --global alias.pr-setup "config --add remote.upstream.fetch +refs/pull/*/head:refs/remotes/upstream/pr/*"

プロジェクト内で

git pr-setup

これで

git fetch upstream
git checkout -b test-pr6666 upstream/pr/666

超絶参考 https://mattn.kaoriya.net/software/git/20140708105946.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment