I am stuck on what I need to do to make a typo change to a lesson

I have multiple links that are provided in the various docs and posts. The most useful links so far are:

  1. How to make a Pull Request on freeCodeCamp
  2. how-to-setup-freecodecamp-locally.md

The forum link above mentions:

  1. Perform the maintenance step of rebasing staging

I have no idea what to do with rebasing unless that is what I did with all these commands from the 2nd link:

git fetch upstream
git reset --hard upstream/main
git push origin main –force
git diff upstream/main

Regardless, there is no staging branch. Using the git command git branch -a, this is what I get:

* main
  remotes/origin/HEAD -> origin/main

Question #1: So why do I need to be on the staging branch? In the md file link above it says to “Create a fresh new branch”. I’d rather do that since that is what I thought you are supposed to do.

Question #2: It also suggests using names like fix/update-guide-for-xyz and some choices are fix/, feat/, docs/. What would be a good prefix for typos or changes in wording?

I found a number of mistakes in the beta web-design course. The first one I wanted to do was to remove the word “is” because it is in the lesson by accident. ONE WORD! I’ve been looking at all the linked pages and docs and instructions for over an hour, and I think I’m going to be at it for at least another hour…to change ONE WORD. Is this how all repos are set up for contributions? Is there a cliff notes version that has a simple step guide?

One more thing: When and if I figure all this out, should I do a commit with a description? If so, how to you add a description?

Once you fork the freeCodeCamp repo and clone it to your personal computer, then you can cd to the freeCodeCamp folder and create a new branch.
Maybe the branch name can be fix/catphotoapp-typos or whatever you want that makes sense for the types of change you want to make.

//in the project directory create and switch to a new branch with this command
git checkout -b fix/catphotoapp-typos

Once you have edited the files fixing the typos, then you run git add . which adds all of those files to the staging area so they are ready to be committed.

Then you run git commit -m "write some commit message here" .
Provide a short descriptive message of what changes you made.

Then you will need to push those changes to the remote repo and add your local branch to the remote repo.

git push --set-upstream origin fix/catphotoapp-typos

On GitHub, you should see a green button that says “compare & pull request” .
Click on that and you can draft a PR from there.

Is the short descriptive message in the -m "message" part? Because I know there is a way to add a longer description along with the commit message.

For the commit message, I would just keep it nice and short.
Then for the PR, you can write a longer description.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.