Basic knowledge about Git and GitHub
You may have heard of terms like Git and GitHub . So, how are Git and GitHub different? Many of you still don’t know. In this article, I will point out the differences between Git and GitHub.
First, briefly explain Git and GitHub.
Git is the name of the distributed version control system (English: Distributed version control system).
Git can edit files on Local PC and manage file editing history.
Previously, CVS and Subversion were often used as software version control systems, but now Git is commonly used.
GitHub is the name of a shared web service for software development projects using Git .
Not only managing your source code with Git, but also reviewing it on GitHub, working with other members to really unleash the true power of Git.
Thus, in short, Git is a system, and GitHub is a service that uses Git. Do not be confused.
Can be developed locally by Git
Here are some brief summaries of Git’s features.
- Can work on Local
- Each programer can own a Repository containing the same information (group of object files under version control).
With CVS and Subversion, changes are reflected to the repository being shared for everyone at all times (centralized version).
Therefore, if you are not careful when committing, there is a risk of incomplete development of the source code, or the sharing of the source code used for testing.
However, with Git as a distributed version, you can commit on your local PC.
While continuing to commit source, you can also push at any time. Therefore, you do not need to worry that the developing source code affects all members sharing it.
For example, in the case of CVS and Subversion, you are required to modify a public blog, but if you use Git, you can modify it in a private draft state.
Basic terminology about Git
|repository||Data storage place. Git manages the data in this storage unit. The revision history is also saved.|
|remote repository||An archive on the server. Save on server and use for sharing.|
|local repository||A local repository.|
|clone||To duplicate a remote repository. The revision history is also duplicated.|
|branch||Manage a range of modifications by branching from the main stream into a separate branch. Editing on one branch will not be affected by other branches, so you can develop several in the same repository at the same time.|
|checkout||Move to a different branch and put your working directory in any commit state.|
|commit||To reflect the modified content in local repository.|
|push||To reflect the revision of the local repository to the remote repository.|
|pull||To reflect the modified contents of the remote repository to the local repository.|
|merge||Combine revisions from different branches. Change history is still saved in all places.|
|conflict||At the time of merge, the same content of the same file was modified both locally and remotely, so it cannot be automatically merged. You will need to edit it manually in both places together.|
It is possible to propose an amendment plan for public software using GitHub
The key feature of GitHub is that you can communicate with other programers through source code.
Many other source code are also publicly available on GitHub. And you can completely request to edit them, as well as propose the source code that you have modified.
If you have any interest in open source code OSS (Open-Source Software), you can confirm the flow to date,
edit the source code and suggest it with a pull request, so you can incorporate your modifications into OSS.
Therefore, GitHub makes it easier to participate in OSS.
In addition to viewing the source code of other programers, you can also publicize your own work / product.
Publicity will help source code be reviewed and get feedback, which is really valuable.
In addition to communication, it also has useful functions in the development process, such as bug management, change request, issue, showing the status of each programer’s activity.
To unleash the true power of Git, it is indispensable for the existence of GitHub.
Basic terminology about GitHub
|pull request||The function of reviewing source code that GitHub has. Use this feature to ask other programers what your fix is when you put it into the original repository or branch. You can prevent errors and fix source code better.|
|Fork||Ability to copy repositories of other programers on GitHub and edit them themselves. By copying with this function, the repository’s repository is also displayed and can clarify which source code is the original version or the copy version.|
|issue||Management functions are provided in GitHub. You can manage project and source code incidents, and also manage issues by linking them to information on GitHub such as source code, pull requests and revision history.|
|organization||A group as an organization, a group or a project. You can create and manage archives in the organization.|
|Gist||A short code and memo sharing service is provided by GitHub. Not only version control, but you can also copy what other programers wrote and embed it on blogs other than GitHub.|
|Pages||Hosting service provided by GitHub. If you have a GitHub account, you can make the site public for free. Easy to do and you can even modify a website with a custom archive.|