Hello there, I am Vikas Kumar student of 2nd-year Information technology B.tech from CBP Government Engineering college
I have been asked by so many students that what is open source, how can I contribute to it? Is it helpful if I contribute to open source, and the list goes on relevant to “Open Source”.
So what is open source???
According to opensource.com The term “open-source” refers to something people can modify and share because its design is publicly accessible.
The term originated in the context of software development to designate a specific approach to creating computer programs. Today, however, “open source” designates a broader set of values — what we call “the open source way.” Open source projects, products, or initiatives embrace and celebrate principles of open exchange, collaborative participation, rapid prototyping, transparency, meritocracy, and community-oriented development. i.e., “open-source is what is free to access by all. Anyone can change and distribute its own model”.
There are so many blogs available on the internet to learn about open source, software and their importance. I won’t be discussing its importance in this article here my main concern is “How to contribute to open-source?”
The most common and widely used platform to contribute to open source is Git and GitHub.
The purpose of Git is to manage a project, or a set of files, as they change over time. Git stores this information in a data structure called a repository. A git repository contains, among other things, the following: A set of commit objects.
GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command-line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such as wikis and basic task management tools for every project.
Here I will Teach You some of the command used in git to push, pull, commit and do changes to your GitHub repository.
First, install Git from the official site https://git-scm.com/downloads and install it in your PC then after creating your profile on Github https://github.com, make a repository and clone (copy the link of your repository) your repository with HTTPS.
Now go to Git Bash software and use this command to clone this repository to your PC.
git clone [your copy link]
Git Bash don’t use ctrl+V to paste any segment so paste your link by using shift+Ins key
Now you have cloned your Github repository to your system now add all you relevant codes in that cloned directory to upload it to your GitHub Profile.
Now when you will type command git status you will see all those files you have added to the directory in red-coloured untracked file segment like this. Here laddu.txt is my unracked file what I have just moved to the directory.
Now to add these files into staging area (Staging is a step before the commit process in git. That is, a commit in git is performed in two steps: staging and actually commit. As long as a changeset is in the staging area, git allows you to edit it as you like to replace staged files with other versions of staged files, remove changes from staging, etc.) use command git add <files_Name with their respective extensions>
Here you can see that now your files are successfully added to the staging area. Now you need to commit these files with a description. And to do so use git commit -m “Your description”
Now we have committed these changes in our local system and to upload these changes to our remote profile use git remote -v
Great, Now just one step left this is to push these changes in our Github repository. use git push origin master command to upload your files or any changes.
Great You have successfully uploaded your files to your GitHub repository.
All the files and directories are uploaded to your Github account. Now you can manage, revert, access or do any changes in your repositories like this. If you need any other help DM me I will add or post another article relevant to issues raised by majorities.
You can also earn some cool swags if you contribute to open source
You can also follow me to my LinkedIn &Instagram handle through
https://www.linkedin.com/in/VikasPandey121/
https://www.instagram.com/VikasPandey121/
Top comments (8)
Excellent article for beginners of git like me. Amazing article. I want to ask that how to contribute to others repository. What are the steps to contribute to someone repository. I always confuse in using git. Plz share one article on how to contribute to someone repository.
The way you contribute to someone's else repo is to use something called a fork. You can find the option at the top right corner of the root page of any repo on github.
When you fork a repo , you create a copy of that repo for yourself. It is different from cloning though as when you clone a repo, the git remote url is set to that of the original author and you have no permissions to write to them.
Once you fork any repo,it will appear on your github dashboard , clone it to your local machine and make whatever changes you want to make. Then commit them and push them to your version of the repo (well that's the only thing you can do anyways)
Once you have pushed the changes to your repo , you can start a pull request to the original repo. This will let the authors of the original repo review your commits and if they like them, they can merge them to the original repo. In short,If they accept your pull r request,you will be added to the list of contributors.
I know this is a pretty long process and it's really tough explaining all of this in the comment section. I can write an article on this if you wish so let me know.
Peace.
Thank you so much. Some confusions has been cleared by your comment. Yes, i want that you will write an article on this. Because my some friends also don't know about it. They are also confused in using git hub by git. I will share your article with them.
Alright , I shall post an article in a day or two.
Thank you.
Glad you liked my article. I will definitely write another blog on how to contribute into any other developer/organisation repository untill that I suggest you to go and look up for the video embedded in the starting this blog it would really help you to contribute into others repository. It will be best practice if you do the same informed in the video all along.
Thank you.
Feel free to ask any queries regarding it.
Great post Vikas,thanks for taking the time to write this up and sharing your knowledge.
Hello Ricardo, Thanks for your motivating comment.It really help to write.🤝 I am glad that you liked my post.