How do I handle it whn someone publishes a fixed version of a project in their repo?

I was having trouble getting a project working on Github Pages and I got some help from a brilliant coder, lasjorg, here:

It’s working fine on Github pages now. It’s just on someone else’s repo. lol

Being still a bit new to Github, I would like to know what the usual protocol is for this at this point. Do I try fork it back into my project somehow?

Or am I just supposed to have a look at it so I can make the same changes to my project?


I would start by trying to fix your own repo code. It isn’t a lot of changes needed.

  1. Move .nojekyll to the public folder.

  2. Update the deploy script to include the -t flag at the end.

  3. I would remove all the redirect code you have as you do not need it. So delete the 404 pages and update the index.html to not have any redirect code inside it.

  4. You can probably keep the .env file and the change to the path from %PUBLIC_URL% to %REACT_APP_PATH% but I’m not sure and didn’t test it. In any case, it isn’t needed so maybe just put it back to the default.

  5. Build it out npm run build and check your output files look correct. The most important is that the .nojekyll is in the output build folder. Then run the deploy script.

  6. Switch to the gh-pages branch and look for the green checkmark on the commit. You can also click the X or checkmark (depending on if it worked or failed) to see the GitHub actions and the log.

Thanks. I just didn’t want to offend anyone by not using Github properly. I was totally overthinking it. ha

That is a fair question in general though. I believe if this was something not for fCC you would need to follow some kind of etiquette here… will leave it to others to fill in this blank as I am not an open source contributor in terms of code…

Seeing as it is a learning project you should try fixing it yourself first. Let us know if you need more help.

As for how we might do it otherwise, I would fork the repo and make the changes then make a PR with the changes. You would review the changes and reject or merge them into your code. This is also great practice and I would highly recommend making PRs to repos like the freeCodeCamp repo which can help you get started with contributing to open-source projects. It is a great way to learn about Git/GitHub and the collaboration workflow.

It is unfortunately a bit of a gray area with regard to the forum rules as we do not allow people to use it for such things. The issue is it becomes an easy way for people to solicit actual work which we do not allow. It would be nice if there was an easier way for people to do collaborations as learning projects through freeCodeCamp but I’m not sure how that would be managed.

I know I have seen people from the forum do some collaborations. I guess people just use chat, Discord, PMs, and so on.


Your directions were so clear, after following them it magically works now.

Though I wish it wasn’t so magically and I understood how you figured this out. But, maybe that’ll come with experience. Or, maybe it’s not necessary to know if I won’t be using gh pages after this. Thanks for the advice on how to make it work on github AND especially the tidbit about not bothering with that anymore. :grinning:

Magic isn’t always bad :magic_wand:

At first, I didn’t understand why it didn’t work and it really wasn’t until I looked at the failing branch commit I saw what was going on.

I then used Google to look for info about GitHub pages and the .nojekyll file as I saw it wasn’t ending up inside the build folder, so I knew something had to be wrong. I randomly found a script that had the -t flag but it didn’t have any information about what it did. So I went to the node_modules folder and opened the gh-pages.js file to see which flags it has and what they do (they do have a help flag as well). I saw the .option('-t, --dotfiles', 'Include dotfiles') line, and then it was obvious why it wasn’t getting pushed.

As for the other changes, they were more just to cover all bases and when it worked I didn’t bother to see if they were needed or not.

1 Like

It looks like I’m not supposed to reply just to say thanks. But, I wanted to say how much I appreciate you explaining your process. Thank you!!! (I promise I won’t do this often, mods. Don’t be mad. :grinning:)

1 Like

many people reply to say thank you. It is not wrong.

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