假設(shè)您剛剛創(chuàng)建了應(yīng)用newapp。
首先,創(chuàng)建一個(gè)新的Git倉(cāng)庫(kù)并且添加一個(gè)Git遠(yuǎn)程倉(cāng)庫(kù)sae,地址為:https://git.sinacloud.com/newapp。
$ mkdir newapp&&cdnewapp
$ git init
$ git remote add sae https://git.sinacloud.com/newapp
上傳代碼。如部署Git的主分支(master)的代碼到新浪云服務(wù)器上的版本1中:
$ touch index.php
$ git add index.php
$ git commit -m"initial commit"
$ git push sae master:1
從新浪云服務(wù)器上刪除版本1的代碼。
$ git push sae :1