DEV Community

Emily
Emily

Posted on

3

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay