HendrikBK / ann-radcliffe_the-mysteries-of-udolpho

Other
0 stars 0 forks source link

Review #1

Open weijia-cheng opened 9 months ago

weijia-cheng commented 9 months ago

Typography

Semantics

Spelling

Metadata

Colophon

Commit History

weijia-cheng commented 9 months ago

I noticed some issues in your recent changes.

As for doing a rebase, I would begin by reading this guide and creating a local copy of your repository as a backup in case you make a mistake while rebasing. Rebasing is very powerful and has the potential to really screw up your commit history, so it's a good precaution.

You'll begin by running the command git rebase -i --root. This will open a temporary file with your git text editor (usually vim; see this page for instructions on how to switch to some popular GUI editors). The temporary file will look like this:

pick e007db6 Initial commit
pick b26edd5 Clean and renamed files of volume 1
pick c0f272b Clean and rename files of volume 2
pick bd0761b Clean and renamed files for volume 3
pick eeda1c6 Clean and renamed files of volume 4
pick d43b2cb Fix titles
pick e70ec76 Add cover
pick 5c3c638 Renamed chapters
pick 1c9394b Typogrify
pick 7cb7a9e Semanticate

etc. You will need to change the pick in the first line pick e007db6 Initial commit to edit. Also, you need to find the pick 9c4ca19 [Editorial] Change capitalization of a word line and change pick there to reword. Once you have made those changes, save and quit from the temporary file.

Once you're in this point, you'll see the message

Stopped at e007db6...  Initial commit
You can amend the commit now, with

  git commit --amend 

Once you are satisfied with your changes, run

  git rebase --continue

At this point, you can edit the body file, delete the license, then run git add -A and then git rebase --continue. Then, git will try to automatically apply the following commits in sequence, but there will be a merge conflict while applying the commit that deleted body.xhtml. It will complain with this message:

CONFLICT (modify/delete): src/epub/text/body.xhtml deleted in b26edd5 (Clean and renamed files of volume 1) and modified in HEAD.  Version HEAD of src/epub/text/body.xhtml left in tree.
error: could not apply b26edd5... Clean and renamed files of volume 1
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply b26edd5... Clean and renamed files of volume 1

Once you get to that point, use git rm src/epub/text/body.xhtml to delete the body.xhtml file again and use git rebase --continue afterwards. Then the following commits will be applied without any issues until you get to a screen where you get to change the message of the [Editorial] Change capitalization of a word commit. Just delete [Editorial] there, save the buffer, and afterwards all of the remaining commits will be applied.

After you've done all this and run git status, you will see a message like

wcheng@pop-os:~/git/ann-radcliffe_the-mysteries-of-udolpho$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 95 and 95 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean

That means that your local repository has different history than your remote git repository. You need to use git push --force to overwrite your remote repository with your local history. Once you are done with this, your git commit history will look as it should.

I basically did the rebase myself locally and reproduced my steps here, so I can assure you these instructions work :) But please let me know if anything is unclear or you get stuck on anything.

weijia-cheng commented 9 months ago

Some follow-up issues: