- 创建gist
- 获取gist ID 如:https://gist.github.com/username/12331233, ID即为 12331233.
- clone gist 最好采用git ssh方式
git clone [email protected]:12331233.git
cd 12331233
//add files...
git add .
git commit -m "add attachment files"
git push origin master
- 查看web页面gist是否更新为独立的文件
- 最好采用git ssh方式以避免用户名/密码权限问题
- clone下的项目内不能创建文件夹,否则push不成功,导致以下错误
remote: Gist does not support directories.
remote: These are the directories that are causing problems:
remote: asserts
To github.com:12331233.git
! [remote rejected] master -> master (pre-receive hook declined)
error: 推送一些引用到 'github.com:12331233.git' 失败
- gist文章里需要引用图片,可采用markdown语法即可