In this week, our weekly assignment is adding more feature to previous Static Site Generator and practicing branching and merging.
I choose two features for application:
- Converting
---
horizontal line in Markdown into HTML<hr>
tag issue#14 - Coverting inline code block in Makrdown into HTML
<code>
tag issue#15
For the adding the feature, I have created two regex to grab the Markdown syntax and replace to HTML tag with contents. This process has been done very smoothly because I only have to alter the code that my lab 2 partner had been made. However, I have created two separate branches and write the code in same line which I expect to merge conflict.
I had change to work with my friend to run the website and other developers in co-op experience. Usually I have merge in GitHub instead of using Git bash or terminal. Dealing with merge conflict in terminal or Git bash is new experience for me.
The first branch merged with fast-forward
merge with no conflict. But the merging second branch has merge conflict. The error message like
Auto-merging kimchi-ssg/helpers.cs
CONFLICT (content): Merge conflict in kimchi-ssg/helpers.cs
Automatic merge failed; fix conflicts and then commit the result.
I can identify where the merge conflict is happened with git diff
. Also Git provides very convenience feature to identify the conflict in the file. 3 sets of indicator <<<<<< head
, ======
, >>>>>>
help me to identify the conflict and allows me to fix the error on IDE. After that I add the file and commit with message. Then I have pushed fully merged into the Github and pull the main
branch to test the features.
This weekly assignment allows me to practice in situation that merge conflict is happened. Next time I can easily deal with merge conflict than this weekly assignment.
Top comments (0)