Git commits the code to the remote repository for the first time

Source: Internet
Author: User
Tags using git

This instructions is to have code first, then create a git repository, and then submit the local code to the remote repository operation steps:

1. Initialization

Execute in the current directory you want to submit

Git init

2. Create a remote warehouse name

git remote add gitorigin https://Github.com/***.git

3. Tell git who you are

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

Of course, this step can be completed ahead of time, if it has been set, you can skip the step, if not set up and execute push, you will be prompted to set.

4. Pull down the configuration in the warehouse first

Git pull Gitorigin Master

5. Push the local code to the remote repository

Git add-a.  // Add all // Submit Staging // push to remote warehouse

After the steps above, we have completed the operation of using Git to manage the local project. Leave a message if you have any questions.

Git commits the code to the remote repository for the first time

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.