曦远 (DealiAxy)一份私人的文字刊物

StarBlog
返回文章列表折页手记阅读全文
Windows

Installing and Configuring Git on Windows

I. Download Git for Windows, homepage: http://gitforwindows.org/  Click “Download” on the page to enter the download list. You can choose a version based on personal preference. Here we choose to download the latest version: Git-1.8.3-preview20130601.exe. II. Installation After downloading, double-click to start the installation: 1. Select all options except AdvancedXXX 2. Choose “Use Git Bash only” 3. Choose

曦远 (DealiAxy)约 9 分钟
目录18 个章节

I. Download

Git for Windows, homepage: http://gitforwindows.org/  Click “Download” on the page to enter the download list. You can choose a version based on personal preference. Here we choose to download the latest version: Git-1.8.3-preview20130601.exe.

II. Installation

After downloading, double-click to start the installation:

1. Select all options except AdvancedXXX

2. Choose “Use Git Bash only”

3. Choose “Checkout as-is, commit as-is”

4. Wait for the installation to complete.

III. Configuration

1. After installation, there will be a Git Bash icon on the desktop

Double-click to enter the Git Shell interface

2. Configure Name and Email

Command format:

git config --global user.name "your name"
git config --global user.email "your email address" 

3. Generate Public/Private RSA Key

Command format:

ssh-keygen -C "your email address" -t rsa

Note the red numbers marked in the figure:

  1. Set the save location for the Public RSA Key; press Enter directly to use the default address;

  2. Set a password and enter it again to confirm (setting one is not recommended here, for convenience of local use)

  3. Save path of the Public RSA Key: c:\users\username.ssh\id_rsa.pub

  4. Provide the Public Key to Github

Please first register a github account, Home Page: https://github.com/ . Then go to the Account Settings page, open SSH Keys, and click “Add SSH Key”. Open c:\users\username\.ssh\id_rsa.pub, copy all of its contents into the input box corresponding to Key, and click “Add Key”.

IV. Clone Repositories

1. Enter the Git Workspace, right-click and choose Git GUI Here:

2. Choose “Clone Existing Repository”

3. Enter the address of the repository to clone and the save directory.

Note that:

  1. Repository address format: git@github.com:your resp address
  2. The last level of the save directory cannot Exist
  3. The blue line in the figure marks your resp address, which can be seen in Account Settings-->Respositories on github.com, as shown by the red circle in the figure below.

4. Enter the password as prompted (the one set in item 3 of section III); you may need to enter it multiple times.

### 5. Clone succeeded.

V. Simplification

The method introduced in section IV is relatively complicated, especially with frequent password entry. Below is a simpler method:

  1. Definitely do not set a password!!!

  2. Open Git Bash Here in the Git Workspace

  3. Enter ssh git@github.com and press Enter; the following prompt indicates that the git@github.com site is already trusted.

About

For more interesting operations, please follow my WeChat official account: DealiAxy Every article is also collected on my blog: blog.deali.cn

_EOF_

Installing and Configuring Git on Windows

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

Win10安装Ubuntu子系统教程

一、启用“适用于Linux的Windows子系统” 通过Win10任务栏中的Cortana搜索框搜索打开“启用或关闭Windows功能”,向下滚动列表,即可看到“适用于Linux的Windows子系统”项。 勾选它,确定,然后按提示重启系统。 二、启用开发人员模式 然后进入“设置 - 更新和安全 - 针对开发人员”设置页面,选中“开发人员模式”。如图: 然后就会下载安装开发人员模式程序包,等待安装

2021-12-18 · Windows · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…