Skip to content

How to Change Submodule Branch Commit

W. Bomar edited this page Dec 8, 2021 · 2 revisions

Steps

  1. Change the pinned commit of submodule.
    (Downloads code from different commit of cms-site-resources repo to taccsite_custom/.)

    # Navigate into submodule (from root of this repo)
    cd taccsite_custom
    # Checkout different commit of submodule repo
    git checkout main_or_other_branch_or_commit
    # Update commit of submodule repo (as necessary)
    git pull # (or git fetch […], etc.)
  2. Save the pinned commit of submodule.
    (Updates the pinned commit of cms-site-resources repo at taccsite_custom/.)

    # Navigate back to this repo (from root of submodule repo)
    cd ../
    # Commit this repo's pointer to a different commit of submodule repo
    git add taccsite_custom
    git commit -m "[…] Update submodule to get […]"
  3. Push the change to a relevant branch.
    (So that the change can be reviewed with relevant Core code changes, if any.)