Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.45 KB

SUBTREE.md

File metadata and controls

65 lines (40 loc) · 1.45 KB

Git Subtree Guide for MFEMFSI folder (iFSI Upstream)

This project includes the external iFSI codebase using git subtree, stored locally in the directory MFEMFSI/

Upstream repository details:

This is a developer-only workflow for adding, updating, and pushing the subtree.


1. Initial Setup (run once)

If you do not yet have the iFSI remote configured:

git remote add iFSI https://github.com/ryanblack129/iFSI.git
git fetch iFSI

You can verify with:

git remote -v

2. Adding the Subtree

If the directory MFEMFSI/ does not yet exist:

git subtree add --prefix=MFEMFSI iFSI main --squash

This pulls the latest iFSI code into your project.


3. Updating the Subtree (pulling upstream changes)

Commit or stash all working-tree changes before updating the subtree. To update your local subtree with the latest code from the iFSI repository, run:

git subtree pull --prefix=MFEMFSI iFSI main --squash

The --squash flag keeps your main repo history clean by condensing subtree commits.


4. Pushing Local Changes Upstream (Developers)

After committing changes inside MFEMFSI/, push them to the upstream repository:

git subtree push --prefix=MFEMFSI iFSI main

This extracts only the subtree changes and pushes them to the main branch of iFSI.