Beginner git and git to upload code to a pit pit in the Sina cloud

Source: Internet
Author: User

first, The Pit initialization (do not initialize the remote repository can not be added)

1, If you do not initialize, git will error: fatal:not a git repository (or any of the parent directories):. git

  

2. To initialize in the root directory of the code folder------>$ git init

  

3. When Master is present and succeeds or is viewed at the root of the folder to see if there is a Hidden. git folder () How to view hidden folders I won't go into more than that, everyone Will.

  

Initialization is complete at this point!

second, Upload the code (you may appear 404 Error) for details, please visit: Http://www.sinacloud.com/doc/sae/tutorial/code-deploy.html#git

1. Add a new git remote repository in your App's git code directory SAE

$ git remote add SAE Https://git.sinacloud.com/testblogs

  

2. Deploy the code to the ' SAE ' version 1.

$ ls-------------this command to see which files/folders are easy to add

  

$ git Add. ———————— "( Note Here is the code you want to upload: can folder, File.) Not ". " )

  

$ git commit-m ' Init my first app '

  

$ git push SAE Master:1 (this step will fill in the username and Password)

The appearance of a similar image above is Successful. Go to your Sina SAE console under the code management to see if a new link is added: http://1.testblogs.applinzi.com

Click to see if it is an error (404):

  

That's right, One thing That's easy to overlook is that the default home page that Sina Server recognizes is Index.html.

Just change the file name to Index.html

and upload Again (

    • $ git add index.html
    • $ git commit-m ' Init my first app '
    • $ git push SAE Master:1

To

Try Again.

It worked!!!

Please specify the author if you want to reprint

20:51:56 2016-10-20

Beginner git and git to upload code to a pit pit in the Sina cloud

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.