iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💡

GitHub: Overview, Installation Guide, and Getting Started

に公開

What is GitHub?

GitHub is a service that allows you to save, publish, and share your code online using a system called "Git," which manages data and modification history for programming code and other content.

Steps to Create a GitHub Account

Since GitHub is a service used by engineers all over the world, the interface is primarily in English, but the steps are very simple.
I was initially overwhelmed by the English interface, but it was surprisingly easy if I followed along using Google Translate!

Step 1: Access the official website

First, access the official GitHub website and click [Sign up] in the top right.

https://github.com/

Step 2: Enter your email and password

A cool animation will start; follow the instructions to enter the following information:

  • Enter your email: Enter the email address you use regularly.
  • Create a password: Set a strong password.
  • Enter a username: Your name on GitHub (alphanumeric characters and hyphens only).
  • Email preferences: Enter n if you do not need notification emails.

Step 3: Human verification test (CAPTCHA)

Select one of the following two tests:

  • Puzzle matching
    Select the specified puzzle piece or the image with many cups of liquid.
  • Audio test
    Press the play button and enter the number of the song where the instrument changes halfway through.

Step 4: Enter the authentication code

You will receive an 8-digit authentication code at the email address you entered. Enter that number on the screen, and your account creation is complete!

Steps to Install Git

To use GitHub, you first need to install Git itself on your PC.

  1. Download the installer
    Download the installer for Windows from the official website.

https://git-scm.com/download/win

  1. Install
    Run the downloaded file. There are many configuration items, but you can generally proceed by clicking "Next."

Screenshot of the installer startup

Creating and Using a Repository

A "repository" is a "magic storage box" for each project. Unlike a regular folder, all modification history is recorded.

How to create a repository (on the GitHub website)

  1. Log in to GitHub, and from the "+" icon in the top right, select [New repository].
  2. Enter an app name (e.g., my-kakeibo) in Repository name.
  3. Select [Private] if you do not want it to be public.
  4. Click [Create repository] to finish!

Example of input on the repository creation screen

Introducing TortoiseGit

What is TortoiseGit?

TortoiseGit is a Graphical User Interface (GUI) tool for Git that integrates into Windows Explorer.

Normally, to operate Git, you need to type commands into a black screen like the "Command Prompt," but by installing TortoiseGit, you can master Git functions (saving and synchronization) intuitively just by right-clicking folders or files you use daily.

Why should you install TortoiseGit?

The bottom line is that management becomes easier.
Normally, to operate Git, you need to type commands into a black screen like the "Command Prompt," but by installing TortoiseGit, you can master Git functions (saving and synchronization) intuitively just by right-clicking folders or files you use daily.

  1. All operations can be completed via the "Right-click menu"
    You can select "Commit (save)" or "Push (send to GitHub)" from the right-click menu on a folder, so you don't need to memorize any difficult commands.

  2. The "Status" of files is clear at a glance (Icon overlays)
    Files you have modified are automatically marked with a "red icon," and saved files are marked with a "green checkmark." It is obvious which files have not been saved yet.

  3. Can be operated in Japanese
    By installing a language pack, all menus change to polite Japanese. You can proceed with management with peace of mind, without being intimidated by technical English terms.

Steps to install TortoiseGit

  1. Downloading and installing the main application
    First, download the installer from the following official website.

https://tortoisegit.org/download/
Click the link that matches your version of Windows (usually 64-bit Windows).

All settings during installation can be left as default (just keep hitting "Next").

  1. Applying the Japanese language pack
    • Select and install "Japanese" from "Language Packs" at the bottom of the same download page.
    • After installation, select the "Japanese" language from [TortoiseGit] > [Settings] > [General] > [Language] in the right-click menu to apply it.

Basic Usage

Cloning (replicating) the created repository to Explorer

  1. Copy the URL of the created repository.
  2. Open Explorer, right-click -> "Show more options" -> "Git Clone"
  3. Enter the URL you copied earlier and click "OK"

The 3 Basic Steps

The basics of Git management involve repeating the following "3 actions":

① Commit
This is the task of "naming your changes and putting them into the storage box."
Example: You save it with a message like "Added login button for household account book."

② Push
This is the task of "sending the contents of your local storage box to GitHub on the internet."
This allows you to view the latest code from other devices.

③ Pull
This is the task of "bringing the latest code from GitHub to your local machine."
Use this when you want to incorporate content updated by others.

Operating Repositories with Visual Studio 2022

Using Visual Studio, you can manage your files with just mouse clicks without needing to type difficult commands.

Select the [Git] menu > [Create Git Repository].

Select your created GitHub account and click [Create and Push].

Operations are also possible from the "Source Control" button in the bottom right of Visual Studio.

Summary

Once you can use GitHub, your development efficiency as an engineer will increase dramatically.
Start by making it a habit to "Commit & Push" frequently, even for small changes!

Discussion