What is Github? 10 useful Github commands
Programmers are sometime landed on Github.com to find a solution of a problem or searching for open source codes. But, not all are familiar with Github and how does it works. This article we are talking about Github. So, latest start-
Github is a valuable website for many pro and/or newbie developers. To understand Github, first we have to know about Git. Git is a command-line open-source version control system that manage and store revisions of projects. Git was started by Linux creator Linus Torvalds. Where Github was built around Git. It is a Git repository hosting service, but it adds many of its own features.
GitHub provides a Web-based graphical interface with access control and several collaboration features, such as a wiki and basic task management tools, etc. Developers are using Github to host their project to collaborate with other developers around the world via public or private repository. So when you landed on Github for a solution or for open source codes, you might accessing other developer’s ongoing collaboration project. You not only can use the source code, but also contribute to it. Github break all the barriers between developers all around to help and learn from each other codes and also contribute to open-source projects.
Here are the four main features that make Github a perfect choice for developers -
When you create a project on Github - it generates a unique URL called repository. This repo (abbreviated to “repository”) is used to locate your project and track your development progress.
Forking is the process of copying one user project to another user account. If you find a project on GitHub that you’d like to contribute to, you can fork the repo, make the changes you’d like, and release the revised project as a new repo.
When you fork a repository and make lots of changes, then want it to be recognized by the original developers or maybe included in the official project/repository. You can do by creating a pull request to the author. After pull request, GitHub provides a medium for you and the author to communicate. The author can see your work, and then choose whether or not to accept it into the official project.
If many developers contributing simultaneously on a project, it’s hard to keep track all revisions - who changed what, when, and where those files are stored. To solve this problem, Github keeping track of all the changes that have been pushed to the repository.
If you amazed by the feature of Github and want use it for your current or next project, then you need to know a few basic commands to work with. Here is the list of 10 most useful Github commands.
1. To set the basic configurations on github
git config -global user.name “Geekboots”
git config -global user.email [email protected]
2. To create a local git repository
3. Add list of files
5. Add text files only
git add *.txt
6. Add docs directory
git add docs/
7. To copy/download repository
git clone repo URL
8. To upload changes
git commit -m "Fixed some bugs"
9. To check changes from last commit
10. To figure out changes made on last commit.