The script introduces a few new commands:
- git scan branch-save > FILE - Searches for git repos and notes the branch/remote being used
- git scan branch-load < FILE - For each sub-repo, call "git checkout"
- git scan up --force - Like the existing "git scan up", this gets the latest code. However, instead of passively avoiding conflicts (eg with "git pull --ff-only"), it aggressively works to match the upstream branch (eg deleting local changes and local commits)
- git cloneinto SRC_REPO TGT_REPO -- Given two existing repos, set TGT to exactly match the code from SRC.
Notably, these "git scan" helpers should work with any git-based build process (incl. composer, drush-make, buildkit, and bash scripts) and many different build-configurations (eg the "drupal-clean" which is just bare Drupal+Civi; or "drupal-demo" which has several modules/extensions preinstalled; or some third configuration with its own mix of modules).