Git Assessment Merge Pictures Branch with Together Branch

Learning Challenge

Git Assessment Merge “pictures” branch to “together” branch


How do I merge the “pictures” branch to the “together” branch without getting a fatal error or going to MERGE_MSG screen (because I have no idea what to do in there or how to exit it)?

What I’ve tried

I have merged the “together” branch with the “drawings” branch. I will include a screenshot of how that looks in the terminal and how it looks in explorer (for some reason it doesn’t reflect in Visual Studio Code at least that I can tell or until I makes the changes in VS Code)

With the “together” branch and “drawings” branch merged, on that new merged branch (under images folder) in explorer you see a file folder (drawings) that has the three jpg files in it like it supposed to from earlier and then two separate jpgs that I put into a pictures folder earlier on a branch named “pictures”.



1 Like

I’m new to coding as well. Let me see if I can help though. I had a problems with this just like you. Once you create and checkout the together branch (you need to be checkouted on the together branch for this to work), then you use:
git merge drawings
This doesn’t actually do a real commit from what I understand but just a fast-forwarded command. Now you need to do merge the “picture” branch with the “together” branch (make sure you are still checkout on the together branch):
git merge picture
If you did it right a code editor window will pop-up. For me that editor is called Nano. It’s the very last screenshot above. It will have a message asking why this merge is necessary. There is provided text there so no need to actually do anything. Just hit Ctrl + X and say Yes and then you can exit back to the terminal. Once there, you can type in tree to make sure the merge was done properly by checking the file structure which should look like this:

You might have to resolve the conflicts on your HTML code in VS Code as well, but apart from that it should take care of that fatal error you’re having. But I am just a fellow classmate trying to get into the August 10th cohort, so take my advice with a grain of salt!!! Good luck.

it’s a link to the same question you asked thats already been solved! you have to click on the thing i posted. They’re basically saying to keep an eye on your current directory. make sure you go back to the root directory before committing

1 Like

I didn’t even try to click it! I didn’t actually notice it was a link! LOL. I will go check it out for sure but I’ve since submitted my assessment and now I’m trying to work on what it said I got wrong!

Thanks again for the link and trying to help me out.

Everything you’re doing is correct, except maybe consider which directory you are trying to commit certain things. If you are not in a broad enough file, nothing will get saved, right? If you are too specific, you cannot save anything. Consider going up or back a file or two…

1 Like

I did finally realize this later on. Thank you so much for affirming my conclusion.