OSD Lab3 Git Merge
In this lab, I need to implement two additional feathers into my release 0.1 project -- urlStatusChecker. I am asked to do each of the feathers in its own branch and then merge them into my master branch in order to learn and get familiar with the git merge processes.
I choose to add two of the following features into my urlStatusChecker:
- Add a
-j
,--json
, and/or\j
flag, which causes the program to output JSON. The JSON output should look like[ { url: 'https://www.google.com': status '200' }, { url: 'https://bad-link.com': status: '404' } ]
- Support
--all
,--good
, and--bad
flags. The--all
flag is the default, and if none of these 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
To begin with, I issued the two feathers that I wanted to add in my repository( Issue-5, Issue6). Then I created two new local branches using the command git checkout -b issue-5/issue-6 master. After I implement both feathers and committed them in their independent branch, I merged them one by one.
When I tried to merge my issue-5 branch into my master branch, it works smoothly and successfully since it was a fast-forward merge.
However, issue 6 branch caused a few conflicts during the merge.
Finally, I typed the command "git commit" to finishing my issue6 merging.
After I pushed my final code into my GitHub, I am able to check the issue 5 commit, issue6 merging commit in Github too.
After this lab, I have a better understanding of Git merging process. I also feel that make code looks more consistent when send pull requests might helps Git to do auto merging easier.
Comments
Post a Comment