DEV Community

Pavel Belokon
Pavel Belokon

Posted on

"Merging Branches"

To start off this week, I worked on selecting two new features to add to my CLI static site generator. However, this time, I had to use different branches to implement these features and then merge them into my main branch, something known as Parallel branches.

What I added

I added support for the lang attribute in HTML, which can be used as an optional input, like so --lang en-CA. This enhancement was addressed in this issue. Implementing this feature was straightforward; it required me to accept additional optional input and pass it to the HTML builder function. Changes

Additionally, I improved my markdown parsing by adding support for horizontal rules (---), as requested in this issue. For this feature, all I had to do was add a simple regular expression to identify all occurrences of (---) in a Markdown file. Changes

During the process of merging these branches, I encountered a merge conflict because I had made updates to the same function in both issues. However, resolving it was not challenging since the changes were relatively small. I found great assistance in VS Code and its visual tools.

In the process of completing this week's tasks, I learned about a fascinating Git feature that helps visualize your workflow, known as git log --graph. I found it to be quite impressive and useful for tracking and understanding the branching and merging of my code.

Top comments (0)