London | 26-ITP-Sep | Sakiya Mayow | Sprint 2 | JavaScript-Fundamentals - #1567
zakiaao-tech wants to merge 28 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
abdishakoor-dev
left a comment
There was a problem hiding this comment.
One thing to fix before I look at the exercises.
What happened
Your Form Controls PR (#1500) was opened from your main branch. So your Form Controls commits are on your main. We should have asked you to fix this on that PR. Then you would have made a new branch before you started Sprint 2.
Then you made this branch from your main. A new branch copies every commit from the branch it starts from. So this branch has 12 Form Controls commits too. You can see them in the Commits tab of this PR.
That is why the bot kept rejecting this PR. You restored the Form Controls files, and that fixed the files. But the 12 commits are still here.
The rule
Every task gets its own new branch. The new branch starts from CodeYourFuture's main. Never do coursework on main itself.
How to fix this PR
Open the terminal in VS Code, in your Module-JavaScript-Fundamentals folder. Run these lines one at a time:
git remote add upstream https://github.com/CodeYourFuture/Module-JavaScript-Fundamentals.git
git fetch upstream
git switch --no-track -c sprint-2 upstream/main
git cherry-pick f95b8bd..cab49f2
git push --set-upstream origin sprint-2
What each line does:
- Gives CodeYourFuture's repo the name
upstreamon your computer. If git says "remote upstream already exists", that is fine. Go to the next line. - Downloads the latest version of CodeYourFuture's
main. - Makes a new branch called
sprint-2. It starts from CodeYourFuture'smain, not from yours. - Copies your 14 Sprint 2 commits onto the new branch. The Form Controls commits are not copied.
- Sends the new branch to your fork on GitHub.
I tested these lines on a copy of your fork. All 14 commits copy with no errors. The files are the same as in this PR now, so you will not lose any work.
Before you open the new PR, check it:
git log --oneline upstream/main..HEAD
You should see 14 commits. All of them should be Sprint 2 work.
Then open a new PR from the sprint-2 branch. Link to this PR in the description, and close this one. I will review the exercises there.
For your next task
You only need git remote add once. For Sprint 3, start like this:
git fetch upstream
git switch --no-track -c sprint-3 upstream/main
Leave your main as it is for now. Your Form Controls PR uses it. Just do not start new work on it.
|
i done most of the instructions, i will open a new PR now. Thank you for your help |

Learners, PR Template
Self checklist
Task code
CYF-1039.
Changelist
I completed the 4 exercises for my coursework, and provided explanation where needed. These exercises included slice() methods, functions, index, number, variables, mathematical calculations, correcting errors, dividing, and objects.