Git Assessment - Include newline or not?

Learning Challenge: Git Assessment

Question: Should my git change history include a newline at the end of the site.html file or not? It looks like it should, from the pictures in the assessment directions, but it wasn’t there in the original file; when I checked with git diff, it flagged a change in the final line for having a newline after it after saving changes.

What I’ve Tried: I finished and submitted the git assessment project, but it seems like it was rejected because of extra whitespace that was added by my VSCode, which had some formatting settings different from the default (I’d been using VSCode already before a/A). It seems like assessments are checked by a script or program, so it’s stricter than I expected.

That has me paranoid about sending my second attempt, so I want to be sure about this last detail, even if it seems silly. I turned off any settings that auto-formatted or added whitespace for me or formatted on save for this go-around.

Thank you.

I had a similar problem— VSCode populated empty alt tags in some of my elements which I neglected to remove, and had it kicked back by the grading script (I assume). Make sure everything looks exactly the same. I disabled the auto-format on save option just to be sure.

1 Like

Thanks, I’m glad to feel less silly for it haha. I managed to pass the other two assessments without a problem, so I went ahead and took a chance submitting the git project in again. Aced it! :slight_smile: Whew.

A little warning to watch out for auto-format settings/plugins in our VS Code might still help future applicants though!

4 Likes

hey all, i’m thinking we have to include that extra line, albeit empty, to ensure the accuracy of your submission. When they include that line and there is a number beside it, I’m thinking that’s pretty intentional, as I did not receive an error code for doing so.

2 Likes

Yep, I included the newline where applicable, to match the pictures they showed with the number next to the line, and that passed the assessment!