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