Git shell Command Upload code

Source: Internet
Author: User

To create a repository step:

1. Create a local folder

2. Go to the folder and execute

Git init
git will versioning files in this folder after initialization

3. Create a repository on a remote server (such as GitHub) and note the SSH

4. Implementation

Git remote Add < a name > <SSH>
you can then submit the code to the corresponding repository by this name

5. Submit Code



To create a git configuration before repository:

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

git config--global  push.default "Simple"

To start creating repository:

mkdir folder name CD above that folder git init touch readmegit add readmegit commit-m ' description ' git remote add xxx <ssh>git push-u xxx mas ter



Upload code:

1. Drag the file you want to upload to git into this folder.

2. Execute the following command in turn:

git Add. Git commit-m ' description ' git push-u XXX Master

3, the above command execution process without error, then it should be uploaded, the wrong words I do not know ....


Git shell Command Upload code

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.