Skip to content

Instantly share code, notes, and snippets.

@hustjiangtao
Created January 8, 2021 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hustjiangtao/7058d97720e27db719fccdc3a838df81 to your computer and use it in GitHub Desktop.
Save hustjiangtao/7058d97720e27db719fccdc3a838df81 to your computer and use it in GitHub Desktop.
add attachment files to gist

为gist添加附件文件及图片

git clone git@github.com: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语法即可

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment