Git bash uploads code to github, gitbash uploads github

Source: Internet
Author: User

Git bash uploads code to github, gitbash uploads github

Today, the notebook of the old man started to get stuck. I decided to reinstall the system.

By the way, let's review the usage of git local commands.

1. Configuration

2. Skip normal operations first. Describes how to connect to the github remote database.

My two keys are in the C: \ Users \ bond \. ssh folder. Open id_rsa.pub and copy all the content. On the ssh key setting page of github, add key.

 

The first point is that github needs an ssh key to identify whether the submitted content is your own operation.

Second, github allows you to add multiple keys. Assume that you have several computers. If you submit them at the company and submit them at home later, you only need to add the keys of each computer to GitHub, you can push data to GitHub on each computer.

3. Clone/upload from remote database to remote database

Clone a simple line of code.

$ Git clone git@github.com: hewasdrunk/test3.git

 

Updating the upload code requires a little more basic operations. I just took my jpg file some time ago.

There are other commands:

Git log to view the content of each modified version

Git status to check whether you submit the price

Git diff test1.html view modified content

In general, as long as git knows and uses the information listed by me, it is qualified.

 

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.