Git in Windows easy to start with

Source: Internet
Author: User

Now make Golang, with Go get github.com/xxx command to need git, submit new project to github.com also want git, old thing, hehe now also want to learn a bit.

Download the Windows version of Git.

• Preparatory work

Set the default user name, mailbox:

git config--global user.name "Your name"

git config--global user.email "[email protected]"

• Add encryption Key

Input directly in GUI bash: ssh-keygen-t rsa-c "[email protected]"

Prompt input, first input: Id_rsa, then all the way to press ENTER, in the C:\Documents and Settings\administrator\.ssh directory will produce 3 files, if not see the current directory there is no, and then moved there.

use: SSH -T [email protected]. Whether COM authentication passed.

• Copy Items

git clone https://github.com/xxx

If the new project uses: Git init, not git clone.

Put the new file into the project using: Git Add. Join All Files

• Set up remote repositories

Git remote add Origin https://github.com/yourname/yourprojectname.git

If it is built online, you can look directly at it. Git is that location and then you copy the path. Git remote remove origin can be deleted, git remote help for assistance.

• Submit

Git commit-m "Comments"

• Upload

Git push-u Origin Master

If prompted to enter a user name, password, it is already available, and finally prompts up-to-date

Git in Windows easy to start with

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.