Hello all, I am on my final attempt in my Git assessment and I recently hit two odd roadblocks.
First Roadblock: according to my Git diff, my html file changes were not being included in my merges and I was missing an extra html line.
What I tried: I noticed that when I added my changes to the stage, the html modifications were still in red when I checked the git status. I had to manually stage the html changes in the VS action window and I believe that was accepted. Is this normal? Does that fully address my git diff error? Is there a specific reason why after multiple saves that the html changes were not able to be staged with the other changes I made?
Second roadblock: I am at the end of the assessment where it instructs to delete the file “images/lands-end.jpg” and I am being met with error messages.
What I tried: On my first re-attempt I just manually deleted it from the visual file folder. My second re-attempt I used the command “rm images/lands-end.jpg” and it said the file does not exist. I thought that was a weird message and decided to double check that it was gone with the “ls” command and nothing appeared at all. When I used the “git branch” command again to double check I was met with “fatal: Unable to read current working directory: No such file or directory”.
What does this mean? How can I fix this and move forward. I am so close to completion. Also, although the message says the file does not exist I can clearly see it in the visual file folder along with the other images.
P.S: again this is my final attempt/second git attempt and I have tried completely deleting the git… folders and starting from scratch a few times to correct this message so I am really confused
Thank you in advance for any guidance.
Second RB photo reference
I just looked up your original submission to see if there was anything out of the ordinary going on. It all looked pretty good (nothing out of the ordinary), but I did see the errors that were identified on your diff:
- The master branch looked great!
- The other 3 branches were missing all of the images in the HTML file.
From your screenshot above, I noticed that you have a commit message without a staging command beforehand. Make sure you always stage your changes first with
git add . , and then follow it up with the commit, such as
git commit -m "your commit message".
If some of the early changes were not staged before they were committed, I think it could explain some of the errors we’re seeing.
Let me know what you think about this idea, and we’ll keep troubleshooting if that seems off-track.
If you still have your original submissions, you can revise it by manually adding the images you see in the diff (but you’ll have to double check that all of the images are in the correct folder in each branch as well). Starting again from scratch is also an option.
Thank you Jesse. Any suggestions on the delete file/fatal message?
I think that was just a result of not staging the files before committing. As a result, I think you gave a command to delete a file that didn’t actually exist.
Double check your file structure in VSCode when you get that message. Is there a file at the exact location of
images/lands-end.jpg? If the path is off, or the image is in a different directory, then it would make sense to get that fatal error.
I also am noticing that you are committing and checking out from the images directory. When you try again, navigate back to the root of the project each time before staging, committing, and checking out, and then you will make sure the changes for the entire repo are tracked correctly, not just inside a particular directory.
Let us know how things turn out with these tips, and good luck!
Somewhere along the way of fixing that problem I must have created another. My final attempt still yielded errors. I appreciate your feedback.
I pulled up your submission and it looks like you are really close - you actually have a very similar issue to another student working on Git today in the forum here. @AkashPatel and @cibee you might be able to work through this together!
Cierra, first, check out the reply to Akash that I linked above. The only difference I see in your diff is that you have an unresolved merge conflict in the together branch. This is represented by the
>>>>>> lines. When you go into that branch to rearrange your pictures, you can delete those extra lines of code and manually make the changes until your pictures look exactly like the screenshots in the assessment directions. Again, make sure you stage and commit the changes in each branch, and double check everything before submitting.