Git associated remote GitHub repository

Source: Internet
Author: User

One. Install Git version control software locally

Two. Configure GIT to set up user information

git config--global user.name "Jack"

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

git config--list get git configuration information

Note:The--global parameter of the git config command uses this parameter to indicate that all of your git repositories on this machine will use this configuration, but you can also specify a different user name and email address for a particular repository.

three. Git connect to remote repository GitHub

1. Generate the key locally based on the configuration account (User.Name)

command: ssh-keygen-t rsa-c "[email protected]"

2. Configure the key on GitHub

Log in to your GitHub account and add Sshkey in SSH keys (open the Id_rsa.pub file under the. ssh file to copy the key to GitHub)

3. Check if GitHub is linked

The authenticity of host ' github.com (192.30.252.131) ' can ' t be establis

RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

Direct Yes

Connection Successful!

Four. Local Remote Warehouse Association

1. Create a warehouse on GitHub

2. Create a warehouse locally

3. Local warehouses connect to remote warehouses

4. Remote Local warehouse synchronization

5. Modify the local commit remote

@1. adding files

@2. Adding files to the repository

The first step git add 0701.txt with the command git add to tell git to add files to the warehouse

The second step of Git commit-m ' first commit ' command git commit tells Git to commit the file to the repository,

After-m input is the description of this submission, you can enter any content, of course, it is good to make sense, so that you can easily from the history of records to find changes.

@3. Push local to remote

This is now committed to the remote

Frequently encountered problems

Git associated remote GitHub repository

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.