freeCodeCamp / curriculum

The freeCodeCamp curriculum and lesson editor
Creative Commons Attribution Share Alike 4.0 International
81 stars 124 forks source link

docs(tools): fixed a typo in the challenge "you" => "your" #302

Closed Marzdor closed 5 years ago

Marzdor commented 5 years ago

ISSUES CLOSED: #17947

Description

Pre-Submission Checklist

Checklist:

Closes #17947

Marzdor commented 5 years ago

I think I did it correctly first time doing this lol.

scissorsneedfoodtoo commented 5 years ago

@Marzdor, sorry that you've been having trouble with this. Hopefully we'll get this sorted out.

You can follow @Nirajn2311's instructions above to reset the changes made to package-lock.json. Alternatively, you can run the following commands:

First, make sure you're on the right branch with git checkout fix/debugging-challenge-typo. Revert the changes to the package-lock.json file with git checkout upstream/dev -- package-lock.json. This will get it in line with the package-lock.json file from the freeCodeCamp/Curriculum dev branch. Then, run git commit --amend and exit out of the editor to use the same commit message. Finally, run git push -f origin fix/debugging-challenge-typo to push the changes to the package-lock.json file to your branch. We should then see the changes reflected here and will be able to merge your fix.

Let us know if we can help with anything else!

Marzdor commented 5 years ago

@scissorsneedfoodtoo I followed @Nirajn2311 instructions and all the checks show passing is there something else that I am missing?

Nirajn2311 commented 5 years ago

@Marzdor sry I forgot to tell one more thing, you don’t have to include package-lock.json when you commit.

Marzdor commented 5 years ago

@Nirajn2311 I figured that but I am not sure how to go about removing it from the commit.

scissorsneedfoodtoo commented 5 years ago

@Marzdor, could you follow the steps from my comment above? I tested them with your PR on my machine and it should solve the problem with the package-lock.json file.

Marzdor commented 5 years ago

git checkout upstream/dev -- package-lock.jsonsays fatal: invalid reference: upstream/dev

scissorsneedfoodtoo commented 5 years ago

I don't believe you set the upstream yet. In that case, please run git remote add upstream https://github.com/freeCodeCamp/curriculum.git and try the commands listed above again.

Marzdor commented 5 years ago

I have it set and i still get that error $ git remote -v

origin https://github.com/Marzdor/curriculum.git (fetch) origin https://github.com/Marzdor/curriculum.git (push) upsteam https://github.com/freeCodeCamp/curriculum.git (fetch) upsteam https://github.com/freeCodeCamp/curriculum.git (push)

scissorsneedfoodtoo commented 5 years ago

I think I see the problem. Seems like your remote is spelled upsteam rather than upstream. Let's rename that first before you go through the steps again:

git remote rename upsteam upstream

After that you should be able to go through the steps listed above.

Marzdor commented 5 years ago

I renamed it to be upstream and it still gives me the invalid reference

scissorsneedfoodtoo commented 5 years ago

That's strange, I'm not sure why you're still getting the error. Could you run git remote -v again and post the output?

Marzdor commented 5 years ago

I am not sure if if that space between upstream and the url is messing it up but I tried removing it and it always has the space

$ git remote -v
origin  https://github.com/Marzdor/curriculum.git (fetch)
origin  https://github.com/Marzdor/curriculum.git (push)
upstream        https://github.com/freeCodeCamp/curriculum.git (fetch)
upstream        https://github.com/freeCodeCamp/curriculum.git (push)
scissorsneedfoodtoo commented 5 years ago

@Marzdor, that seems fine. I get the same output when I run that command on my machine. Does git checkout upstream/dev -- package-lock.json still throw an error? If so we can figure out some other way to get the package-lock file sorted.

Marzdor commented 5 years ago

Yes, it still gives me the invalid reference error.

scissorsneedfoodtoo commented 5 years ago

Sorry that you're still getting the error. We could try looking into the git log and try to figure out what point to roll back to, but I fear we might have polluted the log by messing with the remote name.

The easiest thing to do now would probably just be to go to the package-lock file in the dev branch, copy it, and paste it over the one in your branch. Not ideal, but it's something I've done in the past when I accidentally committed it.

Marzdor commented 5 years ago

After I copy it to my branch do I have to re commit or anything?

scissorsneedfoodtoo commented 5 years ago

Yes, you'll have to add the file, run git commit --amend to use the same commit message, and force push it to your branch with git push -f origin fix/debugging-challenge-typo. After that we should be good.

Marzdor commented 5 years ago

Okay, lets see if that worked.

Nirajn2311 commented 5 years ago

@Marzdor you have included package-lock.json again

Marzdor commented 5 years ago

when I do git commit --amend it gives me this.

docs(tools): fixed a typo in the challenge "you" => "your"

ISSUES CLOSED: #17947

 Please enter the commit message for your changes. Lines starting
 with '#' will be ignored, and an empty message aborts the commit.

 Date:      Mon Sep 3 16:29:00 2018 -0700

 On branch fix/debugging-challenge-typo
 Changes to be committed:
       modified:   challenges/02-javascript-algorithms-and-data-structures/debugging.json
       modified:   package-lock.json

 Changes not staged for commit:
       modified:   package-lock.json
scissorsneedfoodtoo commented 5 years ago

Looks like you're on the right track, but haven't added the package-lock.json file. Add it by running git add package-lock.json, then run git commit --amend again to use the same commit message, and finally git push -f origin fix/debugging-challenge-typo.

Marzdor commented 5 years ago

Oh, yeah, I think it worked.

Nirajn2311 commented 5 years ago

@Marzdor it has worked and everything LGTM.

scissorsneedfoodtoo commented 5 years ago

:sparkles: :sparkles: :sparkles: Awesome! Congratulations on your first contribution to freeCodeCamp! :sparkles: :sparkles: :sparkles:

Thank you for submitting a PR for this issue, @Marzdor. Sorry about all the trouble with git. Glad you were able to work everything out and we could get your change merged. We're all really looking forward to your next contribution! Also, thank you @Nirajn2311 for your support with this PR!