Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
githubで、プライベートリポジトリのソースコードを検索しようとすると、常にマスターブランチの結果が表示されます。別のブランチから結果を取得する方法はありますか?
を使用する場合はzsh、これを行うための1つのライナーがあります。
zsh
$ zipgrep 'string' =(curl -sL https://github.com/org/repo/archive/branch.zip)
私はついにそれを行う方法を見つけました!
githubリポジトリに移動し、settings検索するデフォルトのブランチを変更します。
settings
これで、このブランチからソースコードを検索できます。