git uploads files to a remote server

Source: Internet
Author: User

When you want to upload files to a git server, you need to do the process:

The first steps are:
1. Local initialization of a git repository
2. Associated Remote Library

1. Local initialization of a git library

Open the Command window in the folder you want to upload: git init; then he will automatically generate. git files

2. Associated Remote Library: command line: Git remote add origin xxxxx

3. Go to the Clone folder: CD Test2 (here must enter the folder, or will report a lot of errors, and so on below have the problem of error)

4. Submit the file git add first.  (Here's the. Submit all documents)

5.ls (view submission file): Readme.md test2.html (in the Test2 folder, I created a new test2.html, if you want to submit the file, it can be placed in this folder and then submitted. The readme is cloned, less this is also possible error. )

6.git Status View state, Green new file:test2.html, refers to the absence of a definite commit

7. The next step is to confirm the submission. Git commit-m "Test2"

.

8. Then take a look at the status: Git status (working tree clean indicates that the commit was successful. )

9. Then pull the code onto git: git push

Summary: The process appears to have the following problems, but before the test

git uploads files to a remote server

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.