App Academy

Git assessment 3/4 Last attempt

Learning Challenge

Git Assessment

Question

I was fixing my mistakes to resubmit, but was not sure on a couple things. During the merge of the Together and the Master branch, does the file Lands-End.jpg get removed from both of the branches? Or just the Master?. Also my other issue is that every time I saved my HTML file, I would get line breaks behind some things and I’m not sure what is causing it. I spoke with staff on Discord and I still could not figure that out.
TLDR: Does Lands-End stay in Together branch? (I’m confused on this part since there is only 1 screenshot in the website) And Does line breaks affect the assessment grading?
This is the Together Branch
image

The line breaks are at 3, 10, and 19. When I try to backspace to move the line up once it’ll just line break and bring it back to how this screenshot is.

Hello, I had that same exact Question as you before i submitted mine. I searched and searched and when I found out what to do it dawned on me on why I was over thinking it. If you were to delete (in this example lands-end.jpg) completely from all of your branches you would end up losing the photo forever and thats not what GIT is supposed to be used for. So say you wanted that picture back, you would be no way for GIT to undo because its already been commited. It tells you to delete land-end.jpg out of your final file system which can sound weird. But it means delete from the Final Master Branch. If you toggle back through your other branches and notice lands-end.jpg still hanging around i would say you are on the right track. Also, make sure the order of the coded lines of jpgs on Site.HTML are in the correct order (Follow the screen Shots in the assessement exactly) for each branch as they might fall out of order during certain merges. Good Luck. Hope that helped.

Ohhhhh that makes so much sense haha. Now the only question is the line breaks. I still can’t seem to get rid of them and I tried so much already

also check the number of lines you have in your code and make sure the screen shots in the assessment are identical to your code and line numbers. If the screenshot in the assessment has for example 17 lines of code after a merge, edit, etc, make sure you also have 17 lines of code as well. Make sure everything is in the same order as the screen shots. cannot stress that enough. (contingent on what branch youre on ofcourse).

Hi Akash,

The line breaks are probably caused by a linter or auto-formatting extension on VSCode. Are you using something like the Prettier extension? It could also be caused by the “format on save” setting. I would recommend looking through the settings for VS Code and disabling anything that seems to be making automatic formatting changes.

Jesse

I don’t believe I have any extensions and I looked around my settings about linters as well but it didn’t work.

Okay so nevermind about the settings. I ended up figuring it out. It was my default formatter that was having issues for whatever reason. I simply just uninstalled and reinstalled it and the line breaks stopped happening.

1 Like

Great news! Let us know if you run into any other issues.

Okay so question about the git assessment. What does it mean when it says:
“Merge the “together” branch into the “master” branch. Fix the conflict by removing the “lands-end.jpg” from the file system. In the “site.html”, remove the line that has the “lands-end.jpg” image on it.”
Does that mean I have to do rm lands-end.jpg after I merge? Or just get rid of it in the HTML line only.

Great question - you need to remove the file itself from your project, AND you need to delete the line of the HTML file that has that image on it.