(仮)Level 1 GitHub Technical Certification Exam

さっそくサンプルを作ったので公開するぞよ。


What is GitHub?
1-1. GitHub is a version control tool for software development
1-2.GitHub is a community for collaborative development
1-3.GitHub is more popular than similar services
2. Basic Knowledge of Git and Version Control
2-1. "Cloning" a Repository
Committing" and "Merging" to a Branch
2-3. "Push" and "Pull" to Remote
Basic Knowledge of GitHub and Collaborative Development
Forking" the repository
3-2. "Pull Request" to the original
GUI tools to make Git and GitHub easier to use
4-1.GitHub Desktop
Sourcetree
5.GitHub is a valuable tool even for individuals


What is GitHub?
GitHub is a service that has two aspects: a version control tool and a community. First, let us explain what you can do with GitHub.

GitHub is a version control tool for software development
GitHub as a version control tool is a type of hosting service that provides a "repository. A repository serves as a place to store the various files used in a development project and their management information in one place.

Not only files directly necessary for software construction, such as source code, can be stored in a repository. Documents such as specifications can also be grouped together and managed in one place. In addition, since the change history is always recorded, it is possible to retrieve a complete set of files at any time and at any point in time.



The most distinctive feature of version control in GitHub is the use of the command line tool Git. Due to its nature as a "distributed version control system," Git can keep a complete history of the repository in the local environment as well. This means that even if your hosting service goes down, you can continue to develop without stopping.

GitHub is a community for collaborative development
GitHub has many useful features for collaborative software development. For example, you can invite other users to your repository and give them access. Or you can set your repository to "public" so that anyone can view it.

Other features available include

Organization: An account for your organization to manage members and repositories.

Issue: Issue management function for tracking bugs, etc.

Wiki: A website for documents that can be easily edited collaboratively.

GitHub Pages: Static websites for public use

Actions: Workflow automation (build, test, etc.)

Codespaces: Online development environment (to quickly build an environment and start contributing to the community)

Codespaces is available as a beta version (at the time of writing).


Atlassian's Bitbucket and GitLab's GitLab are probably the most famous GitHub-like services. Both are popular, but GitHub is the world's largest Git repository service. In 2018, GitHub became part of Microsoft, but has continued to operate independently with the company's support since then.

Microsoft also has Azure Repos, which hosts Git repositories. It is a service similar to Google's "Cloud Source Repositories" or Amazon's "AWS CodeCommit".

Basic Knowledge of Git and Version Control


To perform version control on GitHub, some knowledge of the command line tool Git is required. We will now explain the basics of Git. However, there are GUI tools that are easy to use, so let's aim to understand the concept of Git.

Repository "Cloning
In Git, one repository corresponds to one folder. By preparing and initializing (init) a new folder, that folder becomes the repository. The folder contains all the data needed by the repository, so version control can be performed only in the local environment.

When using GitHub, you will often want to start work from a repository created on GitHub. That repository may already contain data. In this case, instead of initializing the repository, you can clone it. Clone is a command that downloads a remote repository and places it as a folder in your local environment. The cloned repository will also contain the location of the repository from which it was downloaded.

Committing" and "merging" branches
To add a file to the repository or make changes to an existing file, you perform a "commit" operation. Commit is a command that stores the specified file in the repository, recording what changes were made in a "commit message". Just editing a file in a folder does not automatically update the repository.

Git also has a feature called "branch" that branches the history in the repository. Using branches, you can try out experimental implementations without affecting the main stream. Once the implementation is successful, the branching history can be merged back together with a "merge" operation.

Branching and merging may be useful when you want to safely manage a series of commits. For example, you may want to implement a feature on a branch, and only after thoroughly testing it can you merge it back into the mainline. It is also useful when multiple people are involved in development and want to work on individual tasks in parallel.

Push" and "pull" to remote
Committing and merging branches are operations on the repository in the local environment. To reflect these operations in the remote repository, you need to explicitly "push" them. Push is a command that transfers files and history stored in the local repository to the remote repository.

If you clone from GitHub, your work will be backed up to the GitHub server, so it is a good idea to push regularly. If you have co-developers, you also need to push to share your work.

On the other hand, remote to local transfer is done by "pull" operation. The latest information, including that pushed by others, can be retrieved. Strictly speaking, however, push and pull are not symmetrical operations. A pull is a command that combines a fetch operation to fetch a repository and a merge to reflect the latest history on the branch you are currently working on.

The Basics of GitHub and Collaborative Development
Next to the basics of Git, let's look at the operations you will need to perform when collaborating on GitHub. Since these are features of GitHub, not Git, you can usually do them from the GitHub website.

Forking a Repository
Forking" is an operation that duplicates an entire repository on GitHub. If another user forks a public repository, a copy of that repository is created in their GitHub account.

Even if you do not have permission to push the original repository, you can freely modify the forked repository since it is under your control. This may be useful if you want to try out your own personal customizations without affecting the original developer.

Pull Requests" to the original
There may be times when you want the original developer to incorporate changes you have made in the forked repository. In this case, you can suggest changes to the original developer through a "pull request.

If your suggestion is adopted through code review and communication, your original implementation or idea will be reflected in the main repository. On GitHub, everyone has the possibility to contribute to an open source project, even if they are not a full member of the project.

GUI tools to make Git and GitHub easier to use
There are many GUI tools for Git and GitHub, including some that you can pay for. All of them are more convenient and easier to use in many situations than the command line. They may also be integrated into a text editor or IDE that you are familiar with, so it is a good idea to check them out.

Here is a brief introduction to two major free tools.








ref


この記事が気に入ったらサポートをしてみませんか?