git installation configuration

Get to know Git first

Git (pronounced /gɪt/.) is an open source distributed version control system that can efficiently and quickly handle version management of projects ranging from very small to very large. The biggest difference between distributed and centralized is that developers can submit to the local, and each developer copies a complete Git repository on the local machine through git clone.

Using Git under windows, you can download it from the official website https://git-scm.com/downloads


After the download is complete, double-click, all the way to next, the default installation is fine.

After the installation is complete, in the start menu, Git->Git Bash, click Git Bash, as long as the command window can be opened, the installation is successful.

You can configure environment variables to see personal habits.


After configuring the environment variables, type git in cmd, and the following content appears, which means the installation is successful.


Then configure the username and email. Because Git is a distributed version control system, every machine must report itself: your name and email address.

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"


Choose a suitable location to create an empty directory to use as Git's local repository.

Generate the public key file ssh-keygen -t rsa -C "mailbox" and press Enter three times in a row.


Find the public key file id_rsa.pub under C:\Users\Administrator\.ssh

Find the SSH and GPG keys in settings in your personal account on GitHub. Set the key, the title is customized, and the key is the content of the public key file you generated.


After generation, you can input ssh -T [email protected] for local test. If the following content appears, it means the connection is successful.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325856151&siteId=291194637