A Little Taste of Open Source

I’ve just finished contributing to my first open source project! Even though the contribution itself is small in terms of code, I think this has proven to be a great starting point for getting familiar with the world of open source and the general workflow related to it.

The first open source project that I had the opportunity of working with is Filer.

Being my first time contributing to open source, it was great to get to know the git command line. I am used to working with SourceTree, but it is definitely useful to learn the command line syntax as well.

I started off by looking at the filer project, located at https://github.com/filerjs/filer. There were some files which needed to be updated and have “var” replaced with “const” or “let” to keep up with the latest standards. The file that I worked with was “filer/tests/spec/fs.unlink.spec.js”.

Here are more details about the work:

· Issue I Filed: https://github.com/filerjs/filer/issues/685

· Pull Request I Created: https://github.com/filerjs/filer/pull/733

· Pull Request I Reviewed: https://github.com/filerjs/filer/pull/723

I started off by filing an issue, which was then assigned to me. The project was forked, and then cloned on my laptop using the “git clone <link>” command. This checked out the master branch, and I created another branch called “issue-685” locally using the “git checkout -b <nameOfBranch>” command. This creates a new branch and switches over to it.

The “git status” command was used to see if I started with a clean working space. Then the node modules were installed using the “npm install” command, and the tests run, as shown in Filer’s contributing page here (https://github.com/filerjs/filer/blob/develop/CONTRIBUTING.md).

To open Visual Studio code with the current working directory, the “code .” command is extremely useful. Then I made the necessary changes to the fs.unlink.spec.js file, located in the tests/spec folder in filer. The changes were checked to pass the tests.

I used the “git status” command again to see which files were changed, and then staged the file that I wanted using the “git add <nameOfFile>” command. The only file that I staged was the one that I made changes to, which was filer/tests/spec/fs.unlink.spec.js. The local changes were then committed using the “git commit” command, and a comment was added to the commit stating what the changes were. Then, finally, the committed changes were pushed using the “git push <origin> <nameOfBranch>” command.

Here is the output that the console gave me:

MINGW64 ~/OpenSource/Release1/filer (issue-685)
$ git push origin issue-685
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 6 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 524 bytes | 524.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: Create a pull request for ‘issue-685’ on GitHub by visiting:
remote: https://github.com/PriyankaCodes99/filer/pull/new/issue-685
To https://github.com/PriyankaCodes99/filer.git
* [new branch] issue-685 -> issue-685

Following the URL given above, I submitted a pull request for my code. https://github.com/filerjs/filer/pull/733 is the pull request that I created.

Since I had worked with Source Control before, this was a fun lab to complete. I hope to learn more about Open Source and contribute more in the near future!