A change involved both restructuring file locations and modifying file content. Following the advice of this answer to ensure that git interprets my git mv
changes as rename
rather than delete
/create
, I split the change into two separate commits.
commit 70c9cf5ab06b1838b1b7c4b8278728bedbaecbf5 (HEAD -> main)
Author: Michael Moreno <michaelmoreno.dev@gmail.com>
Date: Fri Apr 7 22:44:01 2023 -0600
:classical_building: `arch` Character,Item ⊃ Entity ⊃ StateMachine :diamond_shape_with_a_dot_inside: `add` Effect/Immunity/Spell system
commit 62a0309e8dd083af9ba2d76ff1ed0614ff33a851
Author: Michael Moreno <michaelmoreno.dev@gmail.com>
Date: Fri Apr 7 07:55:02 2023 -0600
:exclamation::recycle: `env` mv characters/ items/ into entities/
Since the earlier commit was auxiliary to the later, I would like to add a reference to the later commit in the older commit's message body
Like so
:exclamation::recycle: `env` mv characters/ items/ into entities/
WARNING: Not a standalone commit, auxiliary to 70c9cf5.
I attempt to do this using
git rebase -i 62a0309e8dd083af9ba2d76ff1ed0614ff33a851^
and marking the commit with reword
, but when I save the new commit message it appears to regenerate a new commit id for the later commit (no longer 70c9cf5), and when pushed GitHub shows
This commit does not belong to any branch on this repository, and
may belong to a fork outside of the repository.
Running git log
shows an entirely new commit id for the most recent commit.
Is there a way to refer to recent commits in the message body of older commits without resulting in the recent commit id to be generated?