Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Working on Different Branches in Parallel
dbelokon
dbelokon

Posted on

     

Working on Different Branches in Parallel

For this lab I continued my contribution toglazed-donut. I have learned a couple of new commands. One of them was to create a new branch:

git branch branchName
Enter fullscreen modeExit fullscreen mode

I also learned how to checkout (aka changing/going to) to a specific branch:

git checkout branchName
Enter fullscreen modeExit fullscreen mode

It was super cool to see how we can work on same branches at the same time. The process of it was effortless, just type in one command and you are good to go😋😎 I also had no idea that Visual Studio IDE had a merging conflict editor! Woah!

New Features

Feature 1: --lang

This time, I've added two features forGlazed-Donut. It now supports the--lang (or simply -l) command, where you can specify a language tag (ex: fr-CA for Canadian French) and it will set the lang attribute in the generated HTML files to whatever value you put. By default, it will set the lang attribute to en-CA. It is done so that the browser can know what language the contents of the file are, and how it can better interpret them.

Implementation Thought Process for --lang

The way I approached the implementation was that I added a new command to ArgumentParser and then modified the HTML skeleton that I was generating by adding the lang attribute and a placeholder for its value.

Feature 2:<hr>

Another feature I've implemented was supporting thehorizontal rule in Markdown files. Basically how the program works now is that whenever it finds 3 or more dashes surrounded by empty spaces, it will replace them with the<hr> element in the generated HTML file(s).

Implementation Thought Process for<hr>

Then, I changed the parsing algorithm for markdown files so that I could identify whether a line had only 3 dashes or more while allowing white spaces before or after them.

Merging Process

The first feature got merged without any conflicts. Everything failed when I was trying to merge the second feature. I had merging conflicts in my README.md file. There was also a conflict in the Program.cs file because it couldn't figure out what line of code to choose. In my case, I just had to choose what lines I wanted from both sides and remove the one that was no longer relevant to the updated code. Luckily, all the merge conflicts (ad2b74c) were resolved successfully.

The End

Overall it was nice to see how powerful Git, GitHub, and Visual Studio are for software development. It was amazing to learn more about each of these tools.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

CS Student who loves learning natural languages, cycling, and baking :) on my way to become a Software Developer~
  • Education
    Computer Programming and Analysis Advanced Diploma at Seneca College
  • Work
    Student
  • Joined

More fromdbelokon

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp