Lab4: Practice git remotes and merges

 In this post, I will describe the journey of lab 4 which practices git remotes and merges. Here is the instruction of the lab4. The purpose of this lab is to practice the following:

  • creating branches to work on new features and fix bugs
  • working on code changes in another project you didn't write
  • using git remote and sharing commits with git push, git pull, and git fetch
  • using git merge and doing practice merges
  • fixing merge conflicts

The additional feature I need to add to the existing project was to ignore URL. For example, if I enter 'tool-name --ignore ignore-url.txt test.html', the tool will check all the URLs inside the test.html file without the URLs inside the ignore-url.txt file. To begin this lab, I look around the whole the projects on the release 0.1 list and picked up one project. 

The process was similar to previous labs. I forked the repository, created a new branch named issue-9, wrote the code to add a new feature, pushed the commit into the new branch, and pulled the request. I asked the author to assign me to this issue and review my code October 13th but I did not get any responses. I pulled request to his repository on October 16th and am waiting for his review.


While I am working on the lab4 using the project named Webpage-status-checking-tool, I got an issue with the additional feature on my project. I assigned the issue to him so he can work on this issue. He pulled the request and I reviewed the commits he pushed.

While I am reviewing his commit, I can practice using git remote and sharing commits with git push, git pull, and git fetch. Before I learned these, I just forked the repository somebody forked my repository to review the code. When I used git remote to get the commits, it makes the work much easier! It is faster to get code and easier to compare the previous and current codes. It was amazing!

I kept communicating with tianlangwu (GitHub username) for the new feature (ignore argument) because his code made some bugs. We talked about these for 2 days and now it works! I did 'git pull tianlangwe issue-12' to merge his code and resolved the conflict. Now he is the contributer of my project. Thank you for adding a new feature on my project, tianlangwu!

I got a small struggle while I was working on this lab. When I tried 'git checkout -b [branch name I want to create] [remote name]/[branch name]', it created some errors because I did not 'git fetch --all' after I added remote. I resolved this fast when I reviewed the lecture again and googled this error. I got confident I will reduce the time for creating a branch linked with another person's branch in the future.

Comments

Popular posts from this blog

Release 4.0 - Part 3: Release

Hacktoberfest: Second Pull Request - wanikani-notifier

Open Source Project: Lab2 (Pull Request)