您的位置:首页 > 运维架构 > 网站架构

git+新浪云 实践 : 网站应用搭建

2015-11-22 00:45 411 查看
新浪云应用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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: