I need to install the most recent branch of a program that uses a deprecated variable. How can I do so?
I tried using
git grep <variable> $(git rev-list --all)
but it 1) only outputs commit hash values and 2) does not gives the last branch.
I need to install the most recent branch of a program that uses a deprecated variable. How can I do so?
I tried using
git grep <variable> $(git rev-list --all)
but it 1) only outputs commit hash values and 2) does not gives the last branch.
Try
git grep <variable> $(git for-each-ref refs/heads refs/remotes/origin --format="%(refname)")
The git for-each-ref
command returns branches (by refs/heads
) and remote branches (by refs/remotes/origin
). git grep
tries to find the keyword from the tip of these branches.