新浪云应用SAE提供免费版本的云服务应用:http://sae.sina.com.cn/ 可以注册使用。并创建云应用:
此处二级域名填为 gitstudy 即 gitstudy.sinaapp.com
代码管理时选用git作为管理工具:
在下载安装好的git中用git bush新建文件夹,并初始化仓库:
$mkdir gitstudy
$cd gitstudy
$git init
编写一个简单的index.html文件:
$ vim index.html
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<TITLE>GIT学习练习</TITLE>
<BODY>
HELLO WORLD!
</BODY>
</HTML>
然后追踪index.html.
$ git add index.html
然后进行提交
$ git commit -m "initial version"
设定版本为v1.0:
$ git tag v1.0
添加远程仓库,命名为gitstudy:
$ git remote add gitstudy https://git.sinacloud.com/gitstudy
推送到远程仓库gitstudy:
$ git push gitstudy master:1
访问网站:gitstudy.sinaapp.com