All posts

Contribution to forgit

published on Sunday July 14, 2019 00:07:00

Everyone can contribute to OSS projects. This post describes how I contributed to forgit -- a utility tool for git with fzf backend.

I was checking out some slides from Speaker Deck and found this interesting deck. The author talked about how you can contribute to open source projects with what you know. What he did contributed to many projects was migrating CircleCI to version 2.0 to improve the CI performance. And the feedback was awesome; people appreciated his PRs.

This motivated me to contribute to open source projects again.
I start with something that I use everyday, forgit.

What is forgit?

From the forgit's README:

forgit is a utility tool for git taking advantage of fuzzy finder fzf.

I got to know forgit from fzf's wiki page. I use forgit to do interactive git add, git diff, etc. You might ask why do I need this when git-add provides -p and -i options.

IMHO, forgit is more intuitive. It lets you quickly use git-add and other git command interactively. But it is not a fully-featured git interactive interface.
With fzf as its backend -- it's fuzzy, blazingly fast, and comes with Vim keybindings.

What did I contribute?

I added grh (git reset HEAD) command to forgit. In my ~/.gitconfig file, I have an alias unstage to do git reset HEAD --. When I see forgit does not have this functionality, I see the opportunity to add this feature.

I start by modifying forgit.plugin.zsh file locally and test it. Once everything works on my local machine, I created a new pull request and it got merged about a week later.

Screenshot below showcases grh (interactive git reset HEAD, aka git unstage) in action. forgit grh


I think everyone can contribute to open source projects. You can start by what you know well. I just love the quote from last slide of Ryo's deck and would like to put it here.

Enjoy Social Coding from what we can do

Ryo Shibayama