Installation and use of GitHub under Windows

Source: Internet
Author: User

First, the official website registration and the establishment

1. Login to the official website, registered account, where the user name will be used later.

2. Create a warehouse. Use public warehouse to create, open warehouse free. (upper right Corner-"plus-" new repository)

First line: Warehouse name.

Second line: Description of the warehouse.

Third line: Select Public Warehouse

Line five: Create a Readme file that describes the project functionality.

Line six: What language is the Add Gitignore project?

3. Once the creation is successful, click Readme.md to compile the file.

Second, install git under Windows

After the download is complete, install it, all the way next.

Third, configure Git

1. Open the Git bash you just installed. The following interface appears.

2. Configure Git

First step: Enter Ssh-keygen–t rsa–c "email address". (Note that there is no space between the ssh-keygen, there are spaces between the other)

The second step: after the carriage return, asked to enter a path to save the key, in parentheses is the default location. It is recommended to enter directly, using the default path.

The third step: Ask to set the password, directly enter two times, you can generate the key. (two files are generated under the default path just now: Id_rsa and id_rsa.pub.) All the content in Id_rsa.pub is the key)

Fourth step: Go to the GitHub official website to configure SSH key.

1. Click on the left edit profiles

2. Click SSH and GPG keys

3. Click on the new SSH key in the upper right corner

Whichever name you want to take. Key is the whole content of the id_rsa.pub just now.

4. Verify that the settings are successful, enter the following command under GIT bash: ssh–t [email protected]

The first time, you will be asked to enter Yes or no, then enter Yes, the other display and this is the same.

If this is not the case, it is possible to display permissions issues, it should be the situation I mentioned above, you see if you generate the key is the correct operation, the directory under the known_hosts this file.

5. Configure your username and email:

git config–global user.name "user name"

Git config–global user.email "Mailbox"

Iv. managed Projects

(i) New warehouses

1. First create a new folder under the F drive, i.e. create a new repository. Name is test

2. Open git bash. The default path at this point is the default path at the time of the previous installation. So first enter the directory. Execute Command CD F:\Test

3. Use the command git init to turn this directory into a repository that git can manage, as follows:

In the Test directory, there will be a. Git directory, this directory is git to track the management version of, nothing to manually change the directory inside the file, otherwise, the GIT repository will be destroyed.

(ii) Adding files to the repository

1. Create the folder you want to upload under the repository EEDM, which has a file 1.txt

2. Right-click the folder eedm-> choose Git bash, execute command: Git remote add origin [email protected]: Lyrcoding/eedm.git

(where lyrcoding is the user name at the time of GitHub registration, EEDM is the warehouse name on GitHub)

3. If you have previously submitted a file, you need to synchronize the contents of the repository locally, with the following command: Git pull [email protected]: Lyrcoding/eedm.git

The effect is as follows: and the local directory will have more files on GitHub

4. Upload the local file to the warehouse below.

Add Command:

git Add. (Add a point after adding, is that you want to submit all the files, if you want to submit the specified file, can write file name)

Submit command:

Git commit–m "Version 2" (-M followed by the prompt message, this message is definitely written, record our submission process, write clearly why the submission or modification of what is very useful.)

Push command:

git push [email protected]: Lyrcoding/eedm.git

So it's done. Viewed in the Web, the project has been uploaded.

Reference: http://www.open-open.com/lib/view/open1423810370232.html

Installation and use of GitHub under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.