A lot of students ask questions about open source. 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. The most common and widely used platform to use for 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.
Let’s discuss some 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-colored untracked file segment like this. Here laddu.txt is the unracked file that 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 command
git remote -v
- Great, Now just one step left this is to push these changes in our Github repository. Use the command below to upload your files or any changes.
git push origin master
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.
- How to Upload Project on GitHub from Pycharm?
- How to Upload Project on GitHub from Android Studio?
- Difference Between Git and GitHub
- GIT | An Introduction to Github
- Issues in GitHub
- Making a Github Bot
- Bitbucket vs GitHub vs GitLab
- An Ultimate Guide to Git and Github
- Creating Repository in GitHub
- List of useful Github Commands
- Using GitHub with SSH (Secure Shell)
- How to Publish a Static Website on GitHub?
- Link your GitHub Account with R Studio
- GitHub App to Add or Remove Labels to Issues
- Using Bitbucket as an extension to GitHub capabilities
- Sync your fork with master in GitHub
- What is GitHub Student Developer Pack and How to Get it?
- 5 GitHub Repositories that Every New Developer Must Follow
- How to Deploy Your React Websites on GitHub?
- Top 10 Useful GitHub Repos That Every Developer Should Follow
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.