LoginSignup
4
3

More than 3 years have passed since last update.

[Git] ファイルがどのbranchに含まているか検索する 

Posted at

謎のmigrationがあるためgit log全体を検索
対象のファイルが含まれるコミットを発見

$ git log --all -- 'db/migrate/2020323*'

commit d178513009038b0d6473de95a685c9402da14123
Author: Cozy <dummy-mail@gmail.com>
Date:   Fri Mar 27 18:20:29 2020 +0900

    〇〇のcolumn名変更

あった。glob対応してるのが嬉しいね

git branchでコミットが含まれるbranchを検索して発見

$ git branch -a --contains d178513009038b0d6473de95a685c9402da14123
  remotes/origin/feature/dummy-feature-branch

これにて一件落着 🙏

4
3
0

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
4
3