Reputation: 1974
I want to run a git command only to specific repositories.
I know 'repo forall
' will help to run a command to all the git projects in that repo.
But, I want to run on specific projects.
For an example.
repo forall -c "git checkout -t remotes/origin/TESTBRANCH"
Will run the git command to checkout to TESTBRANCH for all projects.
But I want to checkout only few projects, 1. kernel 2. frameworks/av 3. hardware/qcom/media.
Tried as below,
repo forall -c "git checkout -t remotes/origin/TESTBRANCH" kernel frameworks/av hardware/qcom/media`
But, not working. Can anyone help?
Upvotes: 0
Views: 156
Reputation: 11581
As indicated by the documentation (repo help forall
), the project names should go before the -c
option:
repo forall kernel frameworks/av hardware/qcom/media \
-c "git checkout -t remotes/origin/TESTBRANCH"
Upvotes: 1