On August 14th, 2020 - I mistakenly merged a pull request against Manhattan instead of master. (This was PR#44)

Those changes were intended for master, so I immediately reverted the merge (PR#45) and hoped for the best. [Aside: I used a GitHub facility to revert the merge] All seemed well - until I wanted to update Manhattan for a new (minor) release.

git now thinks the merge-base between Manhattan and master is b4ce252 which was the last commit before the bad merge. This seems like the right commit - however, the commits to revert the bad merge (change/add a bunch of files, remove/revert those same files) are still intefering with attempts to merge the current master onto Manhattan. All attempts to update Manhattan seem to ignore the files from the original bad merge - so those files (lots of them) remain unchanged or simply do not exist.

6b6c084c70c63ec05ba06a280ecb16e83b1e950d    bad commit (add new files, modify others)
72d905da819325bcb8c442f0bdcb6474cf2d32e8    commit to fix (i.e. delete, revert a bunch of files)
2a66909778450bcc2f585d20ee84eac944233de7    what I think should be the new merge-base

The seemingly only way forward was to use  'git diff --name-status upstream/Manhattan upstream/master' to create a list of files that were different (and in what way) on the two branches and manually make the modifications necessary to make the two branches consistent. There was one file (filter_mod.f90) that had content on Manhattan that needed to be preserved. The attached script shows what I did.


upstream.csh


my remote setting:  'upstream git@github.com:NCAR/DART.git'



Tue Oct 27 15:03:44 MDT 2020:

After running the script, the Manhattan branch had the one change from PR60 that still needed to be put onto master. After that merge, the hope is that the merge-base between the two branches would be correct. I believe the following demonstrates that it is.  What remains to be done is to update the Changelog.md on Manhattan ... issue a new PR, and tag it 9.9.0.

We then have to merge Manhattan 9.9.0 back onto master ... update master with the two existing PRs, update the Changelog, issue a PR to update Manhattan and tag it 9.9.1



0[1591] cisl-minnetonka:~/git % git clone git@github.com:NCAR/DART.git dartdummy

Cloning into 'dartdummy'...

X11 forwarding request failed on channel 0

remote: Enumerating objects: 2, done.

remote: Counting objects: 100% (2/2), done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 80073 (delta 0), reused 1 (delta 0), pack-reused 80071

Receiving objects: 100% (80073/80073), 449.63 MiB | 21.48 MiB/s, done.

Resolving deltas: 100% (61395/61395), done.

Updating files: 100% (4686/4686), done.

0[1592] cisl-minnetonka:~/git % cd dartdummy/

0[1593] cisl-minnetonka:~/git/dartdummy % git branch -a

* Manhattan

  remotes/origin/Classic

  remotes/origin/Easter

  remotes/origin/Fiji

  remotes/origin/Guam

  remotes/origin/HEAD -> origin/Manhattan

  remotes/origin/Hawaii

  remotes/origin/Iceland

  remotes/origin/Jamaica

  remotes/origin/Kodiak

  remotes/origin/Lanai

  remotes/origin/Manhattan

  remotes/origin/master

0[1594] cisl-minnetonka:~/git/dartdummy % git checkout master

Branch 'master' set up to track remote branch 'master' from 'origin'.

Switched to a new branch 'master'

0[1595] cisl-minnetonka:~/git/dartdummy % git merge -Xpatience Manhattan

Merge made by the 'recursive' strategy.

 assimilation_code/modules/assimilation/filter_mod.f90 | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)

0[1596] cisl-minnetonka:~/git/dartdummy % git merge-base master Manhattan

eb64168d96a6973dd6a7d49296c4980002311389

0[1597] cisl-minnetonka:~/git/dartdummy % git show-ref master

29cca025b29833c94e72c021c7b82a35c30d4a00 refs/heads/master

3ca8acdc7c47ed946d6fe3859ccfc22c71328952 refs/remotes/origin/master

0[1598] cisl-minnetonka:~/git/dartdummy % git show-ref Manhattan

eb64168d96a6973dd6a7d49296c4980002311389 refs/heads/Manhattan

eb64168d96a6973dd6a7d49296c4980002311389 refs/remotes/origin/Manhattan

0[1599] cisl-minnetonka:~/git/dartdummy % git diff --name-only master Manhattan

0[1600] cisl-minnetonka:~/git/dartdummy



  • No labels