Windows 平台重装 Jekyll and Git
Jekyll
System: Windows 8
Git: Git-1.9.5-preview20150319.exe
https://help.github.com/articles/generating-ssh-keys/
$ git config --global user.name "hiclick" $ git config --global user.email "your@email.com"
http://jekyllbootstrap.com/usage/jekyll-quick-start.html
1. Create a New Repository
Go to your https://github.com and create a new repository named hiclick.github.com
create a new repository on the command line
echo # hiclick.github.com >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/hiclick/hiclick.github.com.git git push -u origin master
push an existing repository from the command line
git remote add origin https://github.com/hiclick/hiclick.github.com.git git push -u origin master
2. Install Jekyll-Bootstrap
Enter these commands into your terminal in a directory you want your blog to be:
git clone https://github.com/plusjade/jekyll-bootstrap.git hiclick.github.com cd hiclick.github.com git remote set-url origin git@github.com:hiclick/hiclick.github.com.git git push origin master
3. Profit
After GitHub has a couple minutes to do its magic your blog will be publicly available at http://hiclick.github.com
4. Publish
After you’ve added posts or made changes to your theme or other files, simply commit them to your git repo and push the commits up to GitHub.
$ git add . $ git commit -m "Add new content" $ git push origin master
5. Setting up a custom domain
https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/
https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider/
https://help.github.com/articles/what-is-my-disk-quota/
修正样式:
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #b12930 !important; }
Git
GitHub Glossary
Git Reference
周六在家更新 about.html ,还未完成提交,SFP就没电了,心中难耐,就直接用Mac在github上更新了代码,今天一早取回本地:
git pull
第一次出错:
Your local changes to the following files would be overwritten by merge, please commit your changes or stash them before you can merge:
about.html
再明白不过,本地的修改和远程的更新冲突了,于是一路 Ctrl + Z,退回到上一次提交的状态,再执行 pull 命令,OK了。
这个 pull = fetch + merge
以下摘自rogerdudler编写的简明教程:
中文版:http://rogerdudler.github.io/git-guide/index.zh.html
英文版:http://rogerdudler.github.io/git-guide/index.html
更新与合并
要更新你的本地仓库至最新改动,执行:
git pull
以在你的工作目录中 获取(fetch) 并 合并(merge) 远端的改动。
要合并其他分支到你的当前分支(例如 master),执行:
git merge <branch>
在这两种情况下,git 都会尝试去自动合并改动。遗憾的是,这可能并非每次都成功,并可能出现冲突(conflicts)。 这时候就需要你修改这些文件来手动合并这些冲突(conflicts)。改完之后,你需要执行如下命令以将它们标记为合并成功:
git add <filename>
在合并改动之前,你可以使用如下命令预览差异:
git diff <source_branch> <target_branch>
4 thoughts on “Windows 平台重装 Jekyll and Git”
Christen March 27, 2015 at 1:46 pm
本计划安装 pygments 实现 Github Page 的语法高亮,早上又灵机一动想在 Mac 上实现代码提交,但终是没有完全理解 Git,最后搞乱环境,不得已只好在 SFP 上重新走一安装 Jekyll 的流程,并将域名定义为
Replychristen.cn
为了不多生支节,语法高亮就直接用 JavaScript SyntaxHighlighter,毕竟以后大多页面,还是要用 HTML 编写。
Christen March 27, 2015 at 1:50 pm
http://jekyll-windows.juthilo.com/3-syntax-highlighting/
ReplyChristen March 28, 2015 at 1:23 am
终于实现了高亮,完美,本地无需安装,线上仅仅需要一个CSS文件而已。
ReplyChristen March 30, 2015 at 5:03 pm
在 SFP 上安装了 Github 的 Windows 客户端,体验有提升!
Reply