Using Git, how could I search for a string across all branches?

前端 未结 5 1986
一个人的身影
一个人的身影 2020-12-22 15:25

Using Git, how could I search within all files in all local branches for a given string?

GitHub specific: is it possible to perform the above search across all GitHu

5条回答
  •  时光说笑
    2020-12-22 15:47

    You can try this:

    git log -Sxxxx  # Search all commits
    git log -Sxxxx  --branches[=]   # Search branches
    

提交回复
热议问题