Git uploads code to GitHub

Source: Internet
Author: User

1. Install Git.

2. Create a Repository

mkdir Test

2. Version Library initialization

CD test/git init

3. Add the project to Git

git add-a     // mark All items

4. Submit

' Test '

5. Uploading to GitHub

Git push Origin Master

The words of success appear
Counting objects:633, done.
Delta compression using up to 4 threads.
Compressing objects:100% (615/615), done.
Writing objects:100% (633/633), 44.45 MiB | 4.00 kib/s, done.
Total 633 (Delta 161), reused 0 (Delta 0)
To https://github.com/name/polyguideoa.git
! [Remote rejected] master, master (Cannot lock ref ' Refs/heads/master ': Ref Refs/heads/master is at 4CC59104FA77BBCAD9 3BBE902F4DC2198CFC23FC but expected 1994F432668C7CB0B1CF7BDF50145456A98C17C5)





To this, basically even if the submission was successful.

But the premise is.

1. First create a new repository on GitHub named Test

2.git Clone this HTTPS address

3. Then your local will appear a test file

4. Enter

CD test/

5.git add-a Upload All

6.git commit-m ' Test '

7.git Push Origin Master

I'm using it for the time being.

Git uploads code to GitHub

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.