GitHub Configuration Usage Guide

Source: Internet
Author: User
Tags git shell
1. Build the project into the project folder

2. Initialize SSH key See the official website Guide. (This machine generates a pair of key,public key to the official website Sshkey below)
https://help.github.com/articles/generating-ssh-keys/
3. Initialize user name, mailbox

$ git config--global user.name "defnngj"//Give yourself a username
$ git config--global user.email "defnngj@gmail.com"//fill in your own mailbox

4.git Init

5.git Add.

6.git commit-m "message for this commit"

7.touch readme.md

8.git Add readme.md

9.git status

10. Go to the GitHub site to create a repo such as "Ts.git"

11.git Remote Add Origin Git@github.com:wuzhuzhu/ts.git
If you encounter fatal:remote origin already exists. Input:

Git remote RM origin

12.git Remote Add Origin Git@github.com:wuzhuzhu/ts.git

13.git Push-u Origin Master

Counting objects:19, done.
Compressing objects:100% (16/16), done.
Writing objects:100% (19/19), 4.54 KiB, done.
Total (delta 1), reused 0 (Delta 0)
To Git@github.com:wuzhuzhu/ts.git
[New branch] Master, master
Branch Master set up to track remote Branch master from Origin.

14. Pull the git document:
On the remote host:

Git remote add Origin git@github.com:wuzhuzhu/ts.git
Git pull Origin Master
The problems encountered:

Windows client is slag ... Or do you want to use git shell to create repo are always network error remote server to take care of ssh key ... git
Remote Add Origin Git@github.com:wuzhuzhu/ts.git
It means making origin to this git URL, not repeating the binding.

The above is the personal simplified version of the GitHub configuration, to the small partners to refer to the next

  • 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.