Study git merge in lab3

 In this week we are studying to manage multiple simultaneous changes. After modifying these files, we will use git merge to combine the changes. It is wonderful for us to collaborate with other people to contribute to the same open source project using git merge. 

I start to practice how to use git merge in my lab3 work. I need to add two new features to my link checker repos named testLink

 

First of all, I create an issue #8 in my testLink repos of GitHub. Then, I create a new branch named issue-8 to add the environment variable feature which is used to make sure the program honors the CLICOLOR environment variable using “git checkout -b issue-8” command. I implement this feature in the issue-8 branch.

 

Second, I create an issue #9 in my testLink repos of GitHub. Then, I create a new branch named issue-9 to add the json flag which is used to causes the program to output JSON using “git checkout -b issue-8” command. I implement this feature in the issue-9 branch.

 

After completing above two steps, I start to merge the two branches to my master branch.  I use “git checkout master” command to transfer my current branch to master branch. Then I use “git merge issue-8” command to merge issue-8 branch to master. So far so good.



But when I use the same way to merge issue-9 branch, there are some conflicts. Because I modify the same code in branch issue-8 and issue-9. Flowing the hint of git, I modify some code to fix the conflicts. 



At last, I add a commit to fixing the conflicts. Then I push all these commits to my GitHub repos.

Comments

Popular posts from this blog

Choose a project in Release 0.4

Open source development course

Publish project in Lab 9