Lab3: Add Features using Multiple Branches
In this post, I will describe the journey of adding features on the command-line tool named url-fi. This tool helps locate broken URLs in any files such as an HTML page or text file using NodeJS.
The two features I added this time are the following:
- Make sure that the program exits with an appropriate error code. If there are no errors (all links are good), exit with 0. Otherwise, exit with a non-zero exit code
- Support --all, --good, and --bad flags. The --all flag is the default, and if none of there are present, it will display good and bad URLs. The --good flag causes only good URLs to get displayed; the --bad flag causes only bad URLs to get displayed
I opened two issues to describe I would add optional features and started working on these. The filed issues are the following:
- Issue 10: https://github.com/hyunjiLeeTech/URL-FI/issues/10
- Issue 11: https://github.com/hyunjiLeeTech/URL-FI/issues/11
I worked on these issues parallelly by creating separate branches named issue-10 and issue-11. While I am stuck on issue 10, I switched issue 11 branch and when I am stuck on issue 11, I switched issue 10 branch. When I've done those issues, I merged the codes starting from issue 10. After I've finished merging issue 10, I merged issue 11 code. As it created merge conflicts, I fixed those and then commit the git.
The commits for both issues are the following:
- https://github.com/hyunjiLeeTech/URL-FI/commit/8c7bd7351952aaa5fc1e35dd448a12b6aee74efb
- https://github.com/hyunjiLeeTech/URL-FI/commit/89934ecd24386b53d5e0d551794ff3b8522e704a
- https://github.com/hyunjiLeeTech/URL-FI/commit/c0bcf5630ddf75188a2b4f1d6ebf34de44a67c35
- https://github.com/hyunjiLeeTech/URL-FI/commit/83e84fd19816fdd8dd5951801a6e673a6162bea7
It was attractive I can work two issues at the same time using different branches. It could create merge conflicts which can be confusing for me to fix it but it is helpful I can work parallelly. I got confident I can do better when I should merge two branches creating merge conflicts.
Comments
Post a Comment