DEV Community

Emily
Emily

Posted on

Git Merge and Git Branch

This week , I had to continue my work on my Shinny-SSg application by adding two new features and practicing git merge on parallel branches. It was a long week for me and I did not really have time to go over all of the OSD600 course material. Luckily, the features were easy to implement and I got only one conflict when trying to do three-way recursive merge for my readme file.

New Feature

The first one I implement is adding an optional -l, --lang for my application. Basically, it will let user specify which language attribute they want to use for html file. For example: -l fr will add lang= "fr" to the html file. It was not hard to implement and I just needed to modify the Page class and added a command option in the main function.
The second feature I add is the exit code for the application.

Git Merge

I had used Git merge and Git checkout command many times before, but I never truly understand it. In the past, every time I got a problem with git merge , I just found a temporary solution on the Internet and fixed it. And this process just made me so nervous when I have to do Git merge on a project. However, after watching the video on Git merge by Prof. David and practicing doing it in my own repository, I feel more confident with my Git skill and working in big project with multiple branches.

Issue and Solution

This is the first issue I have when doing Git merge from 2 different history branches: main and issue-13. I resolved it with removing conflict in my code and commit the change.
Alt Text

Top comments (0)