Git Assessment Learning Challenge + <img src="images/drawings/lands-end.jpg">

Learning Challenge

GIT

Question

So even though I used up my last git assessment attempt I just can’t walk away without knowing what I did wrong.

Below you’ll see what I missed.

’master’ branch

— a/site.html
+++ b/site.html
@@ -9,6 +9,7
@@+

So I know the + indicates something a line that my code had that the solution doesn’t.

But here’s why I’m puzzled. My final master commit looks like this:

Drawing and Pictures

As you can see is nowhere to be found.

This is incredibly disappointing as this was my last assessment attempt after being granted one more. Regardless I’d still appreciate if someone could help me figure out what I did wrong so I’m not scratching my head for the next few weeks.

Thank you in advance for you help.

I see that a/a deleted the code I pasted after “My final commit looks like this:” Basically in my final commit you’ll find the four images that are required but the lands-end jpg is not included.

Where do you think I went wrong?

Hi,
I was able to open up your submission, and I do see the lands-end image in there, with a total of 5 images in the master branch in the submission.

There are a few reasons that this might have happened, even if you thought you had removed it.

  • It is possible that you submitted an old version of your zip file
  • It is possible that you may have staged and committed the new change, without saving the file first (if this is the case, you would see a little dot next to the file name in VSCode).
  • It might also be possible that a change was saved and staged, but not committed
  • Finally, it is possible that you made the change, but the change was committed to a different branch.

It is difficult to tell exactly what happened from looking at the diff and the submission, but we often see issues related to the bullets above.

Jesse

Hey Jesse,

By dot do you mean the little red triangle/dot in-between the 11th and 12th line just like the image in the assessment shows (posted below). This is the only thing resembling a red dot that I have in my code.

If this is what you’re referring to then I’m still not sure I know how to remedy the issue. I have my file on auto-save. When I ignore the auto-save and press save nothing appears to change.

Also should I be deleting the lands-end jpg from the drawings folder in the master code?

Thank you so much for your help.

The dot I was referring to would have been in the top tab that says site.html, so it looks like you don’t have one. A dot shows up there if you have made changes that are not yet saved.

You are correct about deleting. Look back at the assessment prompt and it will outline exactly what to do in the master branch.

Looks like you’re almost there!
Jesse

Hey Jesse,
Deleting lands-end.jpg from the drawings folder on the master branch is the one thing I didn’t do. I’d like to assume that’s why I failed but according to the git diff I can’t be certain that’s the case. I’m still puzzled and am worried to make a next move as I’ve already failed for this exact reason twice and have done the assignment over again thinking I missed some small detail.

I know I didn’t submit an old version of the zip.
It’s possible that I staged and saved a change but didn’t commit although again I’ve gone back and done the assignment a couple of times now and would think that’s not the case, nor did I make the mistake of making the wrong commit to a different branch.

Would I be penalized for making too many commits?

Sorry for almost thinking out loud here, I’m just trying to get this right.

Enjoy the weekend,
Spencer

Hi Spencer,

Great question about making too many commits!

When we run the tests on your project (which generates the diff), the tests are really just looking at the contents of each branch in their present form. So, it’s really important to make sure each branch matches the specification/screenshots in the assessment…but it’s OK if you get to that point through a slightly different route (for example, having extra commits, manually rearranging images, etc).

I hope this helps!
Jesse

Jesse!

So I kind of can’t believe I just passed that module after what feels like the 10th attempt.

Here’s the thing.

Sure I passed, that’s obviously great, but I still am a bit flummoxed.

I think what went wrong is that in visual studio code there was an M next to the site.html file. The first couple times I submitted the code, the M was still there when I submitted, which I later found out meant that the file had been modified but not committed.

Here’s where I guess my confusion lies.

When I add I ALWAYS used “git add .” Which in my mind meant that everything was committed. However it appears that the site.html wasn’t committed this way and that to properly commit it i had to stage it with “git add site.html” before then committed. Going forward will I always need to do “git add . site.html”?

Any help would be appreciated.

1 Like

Hmm…That does sound puzzling. I believe git add . really should have done the trick. I still suspect that perhaps there were unsaved changes, or maybe it was pushed to a different branch.

In the past, I’ve definitely found myself using git add ., and THEN realizing I hadn’t saved something…and having to start the process over after doing the save.

But, congratulations! I know you’ve been working very hard on this, and it has definitely paid off!

Jesse