windows git bash install|windows git bash インストール

Introduce | 導入

Windows includes cmd and powershell by default.

People who are used to using shell scripts such as Linux and MacOS can improve work efficiency by installing Gitbash.

I will explain how to change Windows CLI to Bash.

I will describe the terminal used this time. Reproducibility may be improved by using the same terminal.

Tools for USE | 使った道具

Global

Microsoft Surface Laptop 3 – 13.5

New Microsoft Surface Laptop 3 – 15

NEW Microsoft Surface Pro X – 13

日本

マイクロソフト Surface Laptop 3 13.5インチ

マイクロソフト Surface Laptop 3 15インチ

マイクロソフト Surface Pro X

install git bash|git bash をインストール

git bash installer

Open an internet browser, copy and paste the URL, and download the exe file.

Start the downloaded file by double-clicking

If you read and agree to the terms of use

Click Next

This time I will only use Git as a client, so I will proceed as it is. When combining with ITS / BTS such as open source Trac, or when exposing the server using SSH, set it to a directory with a short space such as C: \ Git and install it. I will.

Click Next

Change the settings to your own convenience and click Next

・Additional Icon → On the Desktop: Add an icon to the desktop. ・Windows Explore → Git Bash Here: Add "Git Bash Here" to the list on the right-click menu of Explorer. ・Windows Explore → Git GUI Here: Add "Git GUI Here" to the list in the right-click menu of Explorer. ・Git LFS (Large File System): Introduces Git LFS (Large File System). ・Associate .git * configuration files with the default text editor: Associates the ".git *" configuration file with the default text editor. ・Assiciate .sh files to be run with Bash: Associates Bash and ".sh" files.

Click Next

Select the editor to use for editing commit comments and so on. You can change to another editor after installation.

If you don't know what the editor is, nano may be safe (I'm just thinking, I'm not saying

・Use the Nano Editor by Default: Use nano editor as standard

・Use Vim (the ubiquitous text editor) as Git's default editor: Vim (default editor until now) is the standard setting.

・Use Notepad ++ as Git ’s default editor: This is the standard setting for notepad ++. You need to install notepad ++ separately.

・Use VisualStudioCode As Git ’s default editor: It is a setting that makes Visual Studio Code the standard. Visual Studio Code must be installed separately.

・Use Git from Git Bash only: Nothing is set in the environment variable path. If you have already built a UNIX compatible environment, it is safe to select this option for the time being.

・Use Git from the Windows Command Prompt: Add C: \ Program Files \ Git \ cmd to the environment variable path. Git commands can be used from the command prompt or PowerShell.

・ Use Git and optional Unix tools from the Windows Command Prompt: C: \ Program Files \ Git \ cmd and C: \ Program Files \ Git \ mingw64 \ bin, C: \ Program Files \ Git \ usr \ bin in the environment variable path Add three. In addition to git, you can use other Unix-derived tools such as ls and less from the Windows command prompt.

Since I want to operate the command prompt and power shell in a bash-like manner this time, select Use Git from the Windows Command Prompt.

Select the communication protocol. Unless you are a strange person who uses Windows Server, I think that Use OpenSSH is fine, but if you are not familiar with corporate users, check with your system administrator or TFS administrator.

Click Next

Handling of line breaks at check-in and check-out to the repository. Checkout as-is, commit as-is: Do nothing about line feed code unless you care. It seems safe.

・Checkout Windows-style, commit Unix-style line endings: Change line breaks to CRLF at checkout and convert to LF at commit.

・Checkout as-is, commit Unix-style line endings: Do nothing about line endings at checkout, convert all to LF at commit.

・Checkout as-is, commit as-is: Do nothing about line feed codes.

Click Next

The default terminal is mintty, the shell is bash, and pacman is the package manager. MSYS2 is easy to use for those who are familiar with Arch Linux.

In this video, we are going to create an arch-based server, so we chose Use MinTTY.

・ Use MinTTY (the default terminal of MSYS2 [Minimal SYStem 2 ]): Use Mintty.

・Use Windows' default console window: Uses the standard Windows console.

Select additional options. If you want to run the CLI with administrator privileges every time you start the CLI, the default settings may be all right.

・Enable file system caching: Enables the fscache cache that improves the response speed at the time of git status, but consumes some PC resources.

・Enable Git Credential Manager: Install Git Credential Manager for Windows (GCM). It supports different two-step authentication to access GitHub, Team Foundation Services, etc., and can store the authentication information in Windows Credential Manager.

・Enable symbolic links: You can use symbolic links in Git. Note that Windows symlinks are not always compatible with those of POSIX.

Click Install

Check lunch git bash and click next

If Git bash is started successfully, it is successful. Thank you for your hard work.

Git bash Shortcut key settings|Git bash ショートカットキーの設定

Keyboard shortcuts may be encountered in the CLI and GUI.

Especially, the shortcut of copy and paste is inconvenient by default, so change the setting.

Click the icon in the upper right of Git Bash

Click option

Click Keys

Check-in Ctrl + Shift + letter shortcuts

Click Save

List of frequently used Linux commands|よく使うLinuxコマンド一覧

Shortcut key | Shortcut key

↑ ↓ | Display command history in order

Ctrl + Shift + c | Copy in command

Ctrl + Shift + v | Paste into command

tab key | Predictive conversion of folders and file names

Ctr (control) + a | cursor at the beginning

Ctr + e | At the end of the cursor

Ctr + b | Move the cursor back one character

Ctr + f | advance cursor one character

Ctr + d | Erase the character at the cursor position

Ctr + h | Erase the character to the left of the cursor position

Ctr + w | Erase the word to the left of the cursor

Ctr + r | Search in command history

List of frequently used | List of frequently used Linux commands

ls | Display contents of folder in list format

ls -a | Display all files including hidden files

cd [move to] | move directory (folder)

cd .. | Move to the previous layer

cd / | Move to root level

cd ~ | Move to the document root layer

mv [source] [destination] | move file

cp [source] [destination] | copy files and folders

rm [folder name] | delete file

mkdir [folder name] | create a folder

touch [file name] | create a file

rmdir | remove folder

cat [filename] | display file contents

find [file name] | List contents of file

diff [old file name] [new file name] | Display differences between files and file contents

grep [Character you want to search] * [File name] | Perform pattern search in file

chmod [permission file name] | Change access permissions for files and folders

chown [user name you want to change] [file name you want to change] | Change the owner or group of a file or folder

ln [Link source file name] [Link destination file name / Folder name] | Link to a file or folder

less [file name] | Browse text files

more [file name] | Browse files by page

clear | Clean screen without erasing

pwd | Display your current position

history | Display command history

Manage users | User management

adduser [user name] | Create a new user

deluser [user name] | Delete user

groupadd [group name] | Create a new group

groupdel [group name] | Delete group

chfn [user name] | Change user information

Manage system | System management

free | Display free memory and used memory

last | Display recently logged in user name

finger [user name] | Display user information

route | Display and set routing

ftp | Transfer files by FTP

ssh | Log in with ssh

This completes the setting. I'm glad if you can use it as a reference.

Tools for USE | 使った道具

Global

Microsoft Surface Laptop 3 – 13.5

New Microsoft Surface Laptop 3 – 15

NEW Microsoft Surface Pro X – 13

日本

マイクロソフト Surface Laptop 3 13.5インチ

マイクロソフト Surface Laptop 3 15インチ

マイクロソフト Surface Pro X

Thank you for your hard work. I'm glad if you can use it as a reference. Thank you for visiting us until the end.

Windows 10 Settings | ウインドウズ10 設定

windows10 initial app uninstall

Windows 10 Privacy and Security Settings

Windows10 Input Settings

Windows10 Cortana disable setting

Windows 10 extension display, hidden file display initial setting

Windows 10 hosts privacy setting

thank you

Thank you for watching until the end. I'm glad if you can use it as a reference.

Help me

We will continue to update useful information. If you don't mind, please donate. If you donate, I'll be happy to jump.