LoginSignup
6

More than 5 years have passed since last update.

github > renameされたファイルのhistoryをたどる

Last updated at Posted at 2015-09-03

前置き

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

手順

  1. リポジトリに移動 (例: github)
  2. ファイル名 ( renamed1.txt )をクリック
  3. Blameをクリック
  4. renameする直前のコミットをクリック (add 3Test)
  5. Viewをクリック
  6. Histroyをクリック

上記にて、「rename前」のhistoryが表示される。

手順3においてrename直後のcommitがどれだったかわからない場合は、「このコミットかな」というのを選択することになるが、その場合、後ろのhistroyが見えない。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6