git install and upload code to GitHub

Source: Internet
Author: User
Tags git client

Reprint Please specify source: http://www.cnblogs.com/cnwutianhao/p/6642887.html

This article should be the latest, most complete, and most reliable GitHub installation process for uploading code.

1.Git Official website: https://git-scm.com/

2.Windows version directly click on 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 the installation

Click Finish to close (do not start git Bash)

4. Bind the project and Git

Find the folder you want to upload the source code, click in, in the root directory, right-click Git Bash here (the old version of Git is the right button will appear git Init here, the new version has NO!!!) Here is a description, the whole network is git Init here, deceptive!!! )

Type git init, enter.

Open the Show hidden file inside the folder options and you'll see the. git folder

5. Create a warehouse on GitHub to store and manage local files

After logging in to your account on GitHub (do not repeat the GitHub account creation manual), re-login to the GitHub site, https://github.com/

You'll see the "New repository" on the right (at least I'm on the right now)

, click this button to enter the new page and create your own library.

After filling out the information, click "Create Repository" below.

A blank library is created.

6. Add the XXX warehouse on GitHub remotely.

In the local project root directory, right-click Git GUI here, select remote from the top row of the pop-up dialog box, and then choose Add.

Name: Feel free to name

Location: The path to the library.

Path to library: find "Clone or download" On the right side of the Blank Project library

, and then follow the example

Copy the address of the library and paste it to the back of the location.

Click "Add"

7. Place the contents of the local file as "Stage Changed" and "Commit" on the master branch of Git management.

Click on "Stage Changed"

, we see that all the changes have been listed.

We clicked, "Commit", the following prompt appears, this is because the first time the computer installed Git has not set a default nickname and email.

Click "Repository", "Git Bash"

Enter your default nickname and email

git config--global user.name "xxx" git config--global user.email "[Email protected]"

Then click "Commit" and we will see the following prompt at the bottom of the window. Prove that the submission was successful.

After that, we click on "Push"

You will need to enter your GitHub login ID and password to upload your project.

Once you have entered your account password, you are prompted to confirm that the project was successfully submitted. On GitHub to see if the local project was uploaded successfully.

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

Follow me on Sina Weibo for more information on Android development!
Focus on technology critics, learn about technology, innovation, education and maximizing human intelligence and imagination!

git install and upload code to GitHub

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.