ksnowlv

回顾过去,总结以往;立足现在,铭记当下;技术为主,笔记而已.

如何把githubblog源代码同步到github上

| Comments

使用github和octopress搭建好github博客后,如何把本地源代码上传到服务器上呢?

1.在octopress下或博客目录(有_config.yml文件的目录)下,使用git初始化命令,如下所示:

1
git init

2.添加远程代码库,如下所示:

1
git remote add origin 远程代码库地址url

3.创建一源代码分支,名称例如为source,使用git创建分支的命令,如下所示:

1
git checkout -b source

然后回车后,会看到控制台输出如下所示:

1
Switched to a new branch 'source'

4.添加并提交文件,如下所示:

1
2
git add --all
git commit -a -m "source files"

5.把源文件push到source分支上,如下所示:

1
git push origin source

Comments

comments powered by Disqus
Included file 'custom/after_footer.html' not found in _includes directory