Install and upload code from Git to Github, and upload code from github

Source: Internet
Author: User
Tags git client

Install and upload code from Git to Github, and upload code from github

Reprinted please indicate the source: http://www.cnblogs.com/cnwutianhao/p/6642887.html

 

This article should be the latest, most comprehensive, and most reliable process for installing and uploading code on Github.

 

1. Git Website: https://git-scm.com/

 

2. Windows Version directly click the lower right corner of the blue computer to download, https://git-scm.com/download/win

 

3. Install the Git Client

Click Install to start installation.

Click Finish to close (do not start Git Bash)

 

4. Bind the project to Git

Find the folder of the source code you want to upload, click in, right-click the root directory, and right-click Git Bash Here (in this case, the Git Init here will appear right-click the old version of Git, no new version !!! Here we will explain that the entire network is Git Init here, and it's a tough nut !!!)

Type git init and press Enter.

Open the hidden file in the folder option and you will see the. git folder.

 

5. Create a repository on github to store and manage local files

After logging on to your account on Github (here I will not go into details about the Github account to create a hand Shun), re-login Github site, https://github.com/

You will see "New repository" on the right side (at least I am on the right side)

Click this button to go to the new page and create your own library.

After filling in the information, click "Create repository"

A blank library is created.

 

6. Add the XXX repository on Github remotely.

In the root directory of the local project, right-click Git GUI Here, select Remote from the above option in the pop-up dialog box, and then select Add.

Name: random Name

Location: library path.

 

Library path: Find "Clone or download" on the right of the blank project library"

, And then follow

 

Copy the address of the database and paste it behind the Location.

Click "Add"

 

7. Upload the local file content "Stage Changed" and "Commit" to the master Branch managed by Git.

Click "Stage Changed"

All the changes are listed.

Click "Commit" and the following prompt will appear, because the default nickname and Email are not set for the first installation of Git on the local machine.

 

Click "Repository"-> "Git Bash"

Enter your default nickname and Email

git config --global user.name "xxx"git config --global user.email "xxx@xxx.com"

Then, click "Commit" and we will see the following prompt at the bottom of the window. Verify that the submission is successful.

Then, click "Push"

When uploading a project, you must enter the Github login account and password.

After you have entered your account and password, the following prompt appears to prove that the project has been submitted successfully. Go to Github to check whether the local project has been uploaded successfully.

We can see that the project has been successfully uploaded to Github, proving that the above process is correct!

 

Follow my Sina Weibo website to learn more about Android development!
Focus on science and technology critics, learn about science and technology, innovation, education, and maximize human wisdom and imagination!

Related Article

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.