Old Love New Love A Song Of Understanding

It was a volcanic eruption Sixteen and Seventeen We were consumed with emotions and sensations that shimmered and glowed like red hot lava We met at a dance Was there music? If there was I did not…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Preparation

Every time I think of contributing to open source, I feel as if I’m diving into the unknown. I logged into the IRC of one of the open source projects, and my feelings intensified when I couldn’t see any text in my IRC window. (I later learned that you see conversations only when people are chatting!)

Anyways, participating in Hacktoberfest has changed the way I think about open source. My experience has been very positive, and I encourage you to take part in this fest if you have the bandwidth.

Thanks to the following videos put out by Amruta Ranade, I didn’t have to hunt for resources on Hacktoberfest, nor worry about the order in which I had to go through them:

Note: Though the above tutorial is for Bitbucket, you can use the Git commands to work with GitHub.

Day 1: Use your primary GitHub account to fork a project from your secondary GitHub account.

Day 2: Edit a file and submit a PR from your primary GitHub account.

Day 3: Use your secondary GitHub account and don the hat of a maintainer: add review comments and request changes on the PR.

Day 4: Slip into the shoes of a contributor and fix review comments and add commits to your PR from your primary GitHub account.

Day 5: Merge the PR as a maintainer from your secondary GitHub account.

Tip: Use different browsers for each account so that you don’t lose your mind :)

P.S: I thought I’d broken my laptop while exploring some open source projects sometime back, and I’ve used VMs to set up docs ever since. I’ll write about how you can use VMs to explore open source projects in a separate post.

I had all this prep work done, but October came, and I hadn’t picked up any issues as I was still unsure if I could do it (I owe my Hacktoberfest experience to the nudge I received from someone in the first week of October).

I set up the docs on my VM before the event but hadn’t anticipated the need to set up the product. My first PR took a lot of time as I had to figure out the product installation method and get started with running simple SQL queries.

Despite practicing the GitHub workflow, I got stuck on a Git issue 2 weeks after the event started. I picked up one of the issues and submitted a PR, but didn’t get a chance to work on the review comments immediately. By the time I got to looking at the review comments, I noticed that someone else had modified the same file on the source repo! I reached out to the maintainers and had to spend some time figuring out the Git workflow. (I’ve documented my PR workflow below, just in case you get stuck like me.)

Liaising with SMEs at CockroachDB was a breeze as Amruta looped in the right SMEs into the PR, and the team responded quickly to queries and review requests.

I use the web version of GitHub to fork the repo and collaborate on pull requests, Atom to edit the docs, and my terminal to run the Git commands. The below workflow may not work for you if you have a different setup (for example, if you are using GitHub desktop or if you are modifying the docs directly in the browser) or if the repo you’re contributing to has a different workflow.

For brevity, in this section, I’m referring to the web version of GitHub as GitHub web, and where I’ve specified commands, you can execute them on your terminal (Mac OS) or Git Bash (Windows OS). Also, note that I haven’t included the outputs on commands here, and remember to replace the <placeholder items> with appropriate values.

I did not fork the repo until I picked up my first issue. Use the below commands to set up your fork:

3. Change directory to the repo folder:

4. Add the upstream remote:

5. Disable the ability to push to remote:

Collaborate on the issue in GitHub web and think about the doc changes you’re going to make. Once you’re sure, create a branch. I generally prefix branch names with my initials so that I don’t get mixed up with any of the upstream repo branches.

Make the necessary changes to the docs and verify that the changes look good, and when you’re ready, commit changes to your fork.

2. Commit the changes:

3. Push changes to your fork:

If you didn’t get to setting up docs on your local machine and cannot verify the doc output via a local build, check if the project you’re contributing to has deployment previews. (Tip: See PRs submitted by other contributors.) Note that this example is specific to CockroachDB docs and deployment previews get generated only after you submit your PR for a review.

Here’s what a preview link in a PR looks like:

Deployment preview example

Here’s another deployment preview example from Kubeflow docs:

Another deployment preview example (Checks tab)

From your fork on GitHub web, create a pull request by clicking the Compare & pull request button.

Click Compare & pull request
Create PR

If everything is good and you don’t receive review comments, your PR will be merged by the maintainer. Skip to Step 7 after your PR gets merged.

If the maintainers request further edits, make those changes and push commits to the same branch. (Use the Git commands from Step 3 to push changes to the same PR).

After the maintainers re-review your edits and merge your PR, proceed to Step 7.

As soon as your PR is merged, you can delete your branch and get ready to pick up a new issue.

3. Now delete the branch from your local machine too:

When you’ve picked up a new issue and are ready to work on doc edits, sync the master branch on your fork before creating a branch. This is what your fork may look like on GitHub web before you sync (depending on how active the repo is):

Fork before sync

Sync the master branch on your fork using the following commands:

After you sync, the master branch on your fork is even with the OS project repo:

Fork after sync

Pick up your next issue and repeat steps 2 through 7.

Note that the above workflow may not work if you are contributing to the feature branches of an open source project.

When I reflect on my contributions, I feel that the following things helped me a lot:

Planning to participate in Hacktoberfest? Here are some tips:

Add a comment

Related posts:

Smokey Skies

The gwawdodyn is a Welsh form with a strict syllable count and rhyme scheme. It includes an internal rhyme in line three. There is another variation of this form in which the internal rhyme is…

First Steps to the World of Crypto!

Stepping into the world of crypto can seem daunting. First it is an emerging field and second it can be volatile. But the good parts — it is mostly rewarding, once you understand it. A question that…