Markdown 语法参考

Typecho和hexo,都使用 Markdown 作为其内容书写语法。

这是因为相较于富文本语法来说, Markdown 更加简洁,原始文件即使没有引擎解析仍然有很好的易读性。

最重要的是 Markdown 通过简单语法,让人们专注于文字书写。

Markdown 编写的文档后缀为 .md.markdown

下面是一些 Markdown 常用语法。

Github已Fork项目同步原始项目代码

你在维护一个项目时候,需要时刻保持Fork的项目和原项目的代码一致,防止冲突。

这里简单记录一下Github如何使自己Fork的项目和原项目同步。

目前有两种方式。

    1. 本地使用命令从原来项目上合并代码到本地,然后在push上去。
    1. 直接在 github 进行一个新的Pull request,然后在pull回本地。

很显然第二种方法十分友好(图形化+chrome翻译吹爆),这里就简单记录一下步骤。

Git 设置代理 加快clone速度

国内访问Github本身就挺难的,但是加上长城宽带简直男上加男

当然直接修改~/.gitconfig文件也可以当然直接修改~/.gitconfig文件也可以

info:Shell走代理的方法:传送门
注意: 代理地址不要加引号,会导致gclient下载出错
1.https.proxy设置是无用的, 只需要设置http.proxy(带查证)
2.使用socks5h://更好, 查询远端DNS

Git设置代理

#设置http代理
git config --global http.proxy socks5://127.0.0.1:1080
#设置https代理
git config --global https.proxy socks5://127.0.0.1:1080
#关闭ssl验证
git config --global http.sslVerify false
git config --global https.sslVerify false

#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

Git 取消代理设置

#取消http代理
git config --global --unset http.proxy
#取消https代理
git config --global --unset https.proxy
#开启ssl验证
git config --global http.sslVerify true
git config --global https.sslVerify true

#取消只对github.com代理
git config --global --unset http.https://github.com.proxy

Git clone 报 fatal: protocol 'https' is not supported 错误

Git clone 报 fatal: protocol 'https' is not supported 错误

Git 错误提示信息Git 错误提示信息

Git 错误提示信息Git 错误提示信息

看到 fatal: repository ' ' does not exist

再联想到ctrl + v时候 bash 不自然的错位,怀疑是不是粘贴进去些奇怪的东西。

在记事本中重新粘贴一下

多了些奇怪的的东西多了些奇怪的的东西

好吧。。。

尝试使用shift + insert重新粘贴一下地址。

OK,一切正常了。

Git正常克隆Git正常克隆