前置き
SO: リネームしたファイルのリネーム前のコミットログが見たいのですが
上記の質問について、これは今後よく使いそうと思ったので調べてみた。
You just need a commit before the rename happened. You could retrieve it locally or via the Blame feature.
After you have retrieved the URL of such commit you just need to click History. You will then see all of the commit history of the file before the rename.
とのこと。
githubにテスト用リポジトリを作成した。
historyのたどり方
前提
ファイル名rename時にそれがわかるコミットメッセージでコミットしておく。
例 rename to renamed1.txt
github commits
手順
- リポジトリに移動 (例: github)
- ファイル名 ( renamed1.txt )をクリック
- Blameをクリック
- renameする直前のコミットをクリック (
add 3Test
) - Viewをクリック
- Histroyをクリック
上記にて、「rename前」のhistoryが表示される。
手順3においてrename直後のcommitがどれだったかわからない場合は、「このコミットかな」というのを選択することになるが、その場合、後ろのhistroyが見えない。