DEV Community

Jason
Jason

Posted on

Release0.3 Seneca-ICTOER/IPC144 -Audit & fix Information.md

I'm responsible for fixing the Information.md page, and the following six issues were fixed:

1. Fixed images work in dark modes. The memory model image's downward arrows and the letter in the bottom right corner are not clear in dark modes. I wrapping them in a tag and adding class "mdImg" to it.
2. The images can't display in all models. Change all the image path from "/img/.jpg" to "../../static/img/.jpg". The issue is fixed.
3. Fix Frontmatter for the page to include id, title, slug, and description.
4. Replace blockquote with Admonitions for clarity.
5. Added alt text for diagram images.
6. Some of " * "will get converted into _ after being formatted with Prettier. I use "\ *" replace them.
Enter fullscreen mode Exit fullscreen mode

How to fix the code

Image description
Image description
Image description

Tips about merging commits

The challenge of this project is about how to merge all commits to one. I failed many times and I have to close the PR and recreate a new one. There are some tips about the issue.

  1. Don’t use git add . because it will often add files you don’t intend, and then you get into a mess when you have to remove them and don’t know how. Instead, use: git add file1 file2 dir1 dir2 Specify the files/folders by name. It will save you making mistakes.
  2. If you’re going to rebase onto main, you need to do this first:

    git checkout main
    git pull upstream main
    git checkout issue-44
    git rebase -i main

  3. There’s no reason to pull from my origin/issue-44 because I made all these commits. Unless I merged something into my fork, which is unlikely.

  4. Don’t do this: git pull origin main, then merge it to issue-44. First, I need to checkout main and pull from the upstream, not my origin.

  5. Use git reflog, check here for more information. Revert your squashed commit by using git reset — hard , make changes, rebase and push it to issue-44 again. Before doing this, you can checkout a new branch to be extra safe.

  6. If the added files are still in staging. For example, .gitignore and yarn.lock staged in git. Use restore --staged to unstage them, use git checkout issue044 to rollback their content. Then use git add for files that you are meant to change, in this case only docs/A-Introduction/information.md and maybe files in static/img. Rebase it and force push.

Top comments (0)