DEV Community

Luke Nguyen
Luke Nguyen

Posted on • Updated on

Happy Hacktoberfest! 🎃 - Part 1

Introduction

This week in my open-source course, I began release 0.2 by working on the ongoing Hacktoberfest. After hours scrolling through hundreds of projects on GitHub without any luck, I decided to ask my professor if I could contribute to one of his under-development projects. Luckily, he was able to assign me an issue.

The issue

After adding a temporary fix to an RSS bug, my professor wanted to remove it now that someone had recently resolved the issue. The task was to undo his work by running a Git command to revert the project to its earlier version.

Working process

With the task at hand, I began by forking a version of the project to my GitHub, then cloning it to my local machine and created a new issue-2141 branch so I could take a look at it:

git clone https://github.com/mqnguyen5/telescope.git
git checkout -b issue-2141
Enter fullscreen mode Exit fullscreen mode

While it was easy dealing with the issue as I only had to run a single git revert command, I wanted to know more about how it works, so I decided to rely on the Internet for more information.

Illustration of Git revert

Photo from GoLinuxCloud

To my understanding, running git revert is like pressing Ctrl + Z (or undo). However, I found out that instead of removing/deleting the latest commit, Git creates a brand new commit with the content of the commit before the latest, as demonstrated by the image above.

Getting my PR accepted

After finishing the research and ensuring that the revert went on successfully, I committed the changes and followed it with a pull request.

Compared to writing pull requests during the labs, the experience was a bit different, as the project I was contributing to required me to be very specific in what I did. From what type of changes I worked on (maybe adding a feature, fixing a bug, etc.) to the issue that I was addressing, everything had to be written out in detail so many people could take a look at it later in case they need to change anything. I had to edit my pull request a bit because I had a typo, but in the end, my pull request was accepted and merged into the project.

Conclusion

Overall, I would say that this was a good start, as I could further familiarize myself with the open-source workflow. Additionally, I also learned a new Git command that I will definitely be using in the future. As October is still on its way, I'm looking forward to next which project I will be working on next.

Happy Coding! 👻

Discussion (0)