Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

"the subtree" refers to all the code under https://github.com/ACME-Climate/ACME/cime

Add CIME to ACME:

This was done once.

ACME was freshly cloned and a connection was established to the cime fork:

git remote add -f --tags CIMEacme https://github.com/ACME-Climate/cime

A branch was created and checked out:   rljacob/cime-merge.

From the top level of ACME, the cime directory was added:

git read-tree --prefix=cime/ -u acme-merge1

 "acme-merge1" is a tag in the fork of CIME.

This was immediately committed with hash:   c0ffdb0103425eb121b9978621daf86fbda5e9da

Subsequent commits on the rljacob/cime-merge branch were to:

  • move model components to their cime locations
  • add cime build capability
  • remove the models directory
  • add ability to build component models with cime.

When modifications from within the subtree need be moved back to the fork:

From inside the ACME branch (or master) that contains the changes:

Code Block
blogin1: git subtree split -P cime/ -b rljacob/acmemerge-to-cime1
Created branch 'rljacob/acmemerge-to-cime1'
fe8c483486af5b95f24ee64ce45ccb6d6fb6061e
blogin1: git branch
  master
  rljacob/acmemerge-to-cime1
* rljacob/cime-merge

Make sure you have a name for the external's git repo.  In below, "origin" is the usual ACME repo and "CIMEacme" is the fork of cime.

Code Block
blogin1[102]: git remote -v
CIMEacme	https://github.com/ACME-Climate/cime (fetch)
CIMEacme	https://github.com/ACME-Climate/cime (push)
origin	git@github.com:ACME-Climate/ACME.git (fetch)
origin	git@github.com:ACME-Climate/ACME.git (push)

Now checkout the master of CIMEacme.  Note that the presence of the mpas-o module will cause a message.

Code Block
blogin1[156]: git checkout CIMEacme/master

warning: unable to rmdir components/mpas-o/model: Directory not empty
Checking out files: 100% (7985/7985), done.
Note: checking out 'CIMEacme/master'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at b496e53... Merge branch 'jgfouca/skybridge_working' (PR #7)