github秘籍

https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.zh-cn.md

高亮代码

在Url后面加上 #L{行号}-L{行号},L必须大些

https://github.com/wmui/essay/blob/master/store/index.js#L30-L45

使用commit关闭issue

关闭10号issue

git commit -am "fix #10"

引用本仓库的issue和其他仓库的issue

本仓库:#ISSUE_NUMBER

其他仓库:{user}/{repo}#ISSUE_NUMBER

注释:可以在评论、commit信息、pull request信息等场景使用

表情符

:smile:

所有的表情符:http://www.emoji-cheat-sheet.com/

常用的表情符

:100:
:sparkles:
:-1:
:+1:
:clap:

备注:在vscode中写markdown时,可以通过输入两个冒号快捷添加符号。

引用仓库中的图片

![Alt Text](https://github.com/{user}/{repo}/raw/master/path/to/image.gif)

设置宽高

[[ https://github.com/{user}/{repo}/raw/master/path/to/image.gif | height = 100px ]]

备注:也适用于wiki中的markdown

任务列表

Issues 和 Pull requests 里可以添加复选框,语法如下。如果已完成,就打上x

- [x] Be awesome
- [ ] Prepare dinner
  - [x] Research recipe
  - [x] Buy ingredients
  - [ ] Cook recipe
- [ ] Sleep

相对连接

在Markdown文件里链接到内部内容时推荐使用相对链接。

[Link to a header](#awesome-section) // hash
[Link to a file](docs/readme) // 超链接

渲染表格数据

GitHub 支持将 .csv (逗号分隔)和 .tsv (制表符分隔)格式的文件自动渲染成表格数据

原文地址:https://www.cnblogs.com/yesyes/p/15375802.html