CodeRoad doesn't recognize git rebase success

Tell us what’s happening:
I used git rebase -interactive to squash the commit “fix: add missing rename table reference” with the commit “fix: add missing rename database reference”.

It looks like it worked! HOWEVER, CodeRoad doesn’t seem to recognize that I accomplished the goal. I clicked “reset” and repeated the rebase several times, and I poked around online, but I can’t seem to figure out the issue.

One hypothesis is that I made a mistake earlier with a capital S instead of a lower case s in the nano editor the first time I tried to do the squash. I tried my best to find a solution, but have hit a wall at this point. Any help would be appreciated so that I can continue with the (fantastic) course.

Here is the (truncated) output in my terminal, BEFORE rebase/squash:

codeally@53789559822b:~/project/sql_reference$ git log --oneline
1cf7083 (HEAD -> fix/add-missing-rename-references) fix: add missing rename table reference
0e082fc fix: add missing rename database reference
193e3a2 (main) feat: add column references

Here are the top two rows in the nano editor:

pick 0e082fc fix: add missing rename database reference
s 1cf7083 fix: add missing rename table reference

Here is the output, indicating success:

codeally@53789559822b:~/project/sql_reference$ git rebase --interactive HEAD~2
[detached HEAD 7b0cd89] fix: add missing rename database reference
 Author: XXXX <XXXX@users.noreply.github.com>
 Date: Thu Sep 9 22:47:21 2021 -0500
 1 file changed, 4 insertions(+), 2 deletions(-)
Successfully rebased and updated refs/heads/fix/add-missing-rename-references.

Here is the new log:

codeally@53789559822b:~/project/sql_reference$ git log --oneline
7b0cd89 (HEAD -> fix/add-missing-rename-references) fix: add missing rename database reference
193e3a2 (main) feat: add column references
87db07c feat: add delete row reference
a72acea feat: add update row reference
88989a2 feat: add insert row reference
.... etc

Your code so far
See above :slight_smile:

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36

Challenge: Build an SQL Reference Object

Link to the challenge:

If I have your location in the course correct - I believe what may be happening here is that you didn’t quite do the rebase right. You were supposed to add a new message when you squashed them.

So you were supposed to rebase → squash that commit → then you go to nano, and in the course instructions it says…
“The lines that don’t start with a # will be the commit messages. Add a new message at the top of the file on it’s own line. Give it the text, fix: add missing rename references When you are done, save and exit the file.”
So you were supposed to add that new message at the top of nano, which would make the last log message fix: add missing rename references. In your post, it shows the last message as fix: add missing rename database reference.

Thank you for your reply!

The course instructions and hints that I see say:

" Replace pick with s next to your commit for adding the rename table reference to squash it. Be careful not to do the wrong one. When you are done, save and exit Nano.

  1. Replace pick with s next to your fix: add missing rename table reference commit

  2. You can save and exit nano by pressing ctrl+x then y then enter

  3. To reset this lesson, make sure nano is closed. Then, hit reset and enter git rebase --interactive HEAD~2 after it’s done resetting"

I am guessing that the next step is the one you are indicating, but I can’t pass the current step to get there.

It feels like I have fallen into a crack somehow. :woman_shrugging:

1 Like

It feels like I have fallen into a crack somehow.

You may have. It sounds like you tried the intended way to get back on track - but I will lay out the steps here that you should try one more time…

  1. Make sure nano is not open
  2. Hit the reset button and wait for the process to finish
  3. enter git rebase --interactive HEAD~2 in the terminal
  4. nano should open with your commits listed, replace pick with s next to your commit as the instructions suggest
  5. save and exit nano (ctrl+x)

That should take you to the next step - which will open nano again, showing you your commit messages, and ask you to enter the new message. It sounds like you got this far, but it did not move you to the next step. Want to try it one more time? If that doesn’t work I can try and help get around this in another way.

One more thing - what does the test text say when the tests run? It’s the little popup text at the bottom. Probably something like You should use the "squash" option.

Still didn’t work… I had to click “run” to get a message at all, and it says “You should use the ‘squash’ option”.

The course is great, and even this “chapter” is a learning experience for me, so thank you :slight_smile:

1 Like

Try these steps:

  1. Enter this in the terminal: echo "const assert=require('assert');describe('You',()=>{assert(true);});" > ~/project/.freeCodeCamp/test/1730.test.js - that should hack the test to pass.
  2. Click run the tests (hopefully they pass - and you are taken to the next step)

I was going to add more about the next things to do - but I think if that takes you to the next step, you might be able to figure it out from there. You may want/need to do another reset at the next step and follow the instructions in the hints again. Those particular resets take your code to a few steps before where you are, which is why you have to enter the commands from previous steps. For instance, the step after the one you are stuck on has this in the hints:
To reset this lesson, make sure nano is closed. Then, hit reset and enter git rebase --interactive HEAD~2 after it's done resetting. Then, in nano, replace pick with s next to your fix: add missing rename table reference commit, and save and exit

Let me know if this works :+1:

Edit: Actually I don’t think this will work. Gimme a second. I changed step 1 to a new command - now give it a try.

Woot! Thank you! I got through the two steps and should now be in the clear.

I have to admit, git is the trickiest bit of this whole backend db course!

1 Like

Hi Tom,

I wanted to add my voice here. I got stuck on the same step as @ellynne.dec and the solution you present here was successful in passing me to the next step.

Once I was there I needed to go back into interactive mode and replace pick with s and then add the new commit message at the top of the text file. Once I saved and exited I was on to the next step :smiley:

Thanks for all your help through this course @moT01 and to @ellynne.dec for starting this thread.

-Richard

Hello I am having the same problem but it does not work the solution you presented. please could you help on this…

The course instructions and hints that I see say:

" Replace pick with s next to your commit for adding the rename table reference to squash it. Be careful not to do the wrong one. When you are done, save and exit Nano.

  1. Replace pick with s next to your fix: add missing rename table reference commit
  2. You can save and exit nano by pressing ctrl+x then y then enter
  3. To reset this lesson, make sure nano is closed. Then, hit reset and enter git rebase --interactive HEAD~2 after it’s done resetting"

I am guessing that the next step is the one you are indicating, but I can’t pass the current step to get there.

I have tried to change reference as references, I have tries the code you place to pass it through and still not being able to make it as pass. and it says “You should use the ‘squash’ option”.

could you help out on this task? I am stuck on this point and I do not know how to move forward.

Hi all,
Sorted!
many thanks

type the whole word “squash” instead of just “s” when swapping it for “pick” in nano.

I couldn’t for the life of me figure out why it wasn’t passing the test. But this will save you time.

:slight_smile:

Actually just an s character works perfectly.

Sometimes people make other mistakes though.

Not working showing that “Test Runner Failed” , suggest any other solution