Skip to content

Instantly share code, notes, and snippets.

@yoshihiro503
Created October 24, 2025 02:56
Show Gist options
  • Select an option

  • Save yoshihiro503/76239679bd9aa7039121e6f8ac4ea2c6 to your computer and use it in GitHub Desktop.

Select an option

Save yoshihiro503/76239679bd9aa7039121e6f8ac4ea2c6 to your computer and use it in GitHub Desktop.

cometbft/cometbft から派生した 0xPolygon/cometbft リポジトリを見ているが、どのタイミングで分岐したか知りたい

分岐点のコミットを探す

git clone https://github.com/0xPolygon/cometbft.git cometbft-polygonfork
cd cometbft-polygonfork/
git remote add upstream https://github.com/cometbft/cometbft.git
git fetch upstream

git merge-base で二つの分岐点(共通の祖先)を見る

git merge-base v0.3.0-polygon upstream/main
1cbd452e4e375aefec6196652737b216bf29a594

git show 1cbd452e4e375aefec6196652737b216bf29a594 で時刻など詳細情報を得られる

近いtag(release)を探す

まずタグを取得:

git fetch --tags

コミット地点そのもののtagがあれば次でヒットする

git tag --points-at 1cbd452e4e375aefec6196652737b216bf29a594

見つからなければ、このコミットを含むタグ一覧を次で取得できる

git tag --contains 1cbd452e4e375aefec6196652737b216bf29a594

名前から v0.38.0-alpha.1 タグとかが一番古くて近そう

DIFF: https://github.com/cometbft/cometbft/compare/1cbd452e4e375aefec6196652737b216bf29a594...v0.38.0-alpha.1

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