Skip to content

Instantly share code, notes, and snippets.

@bindiego
Last active March 24, 2020 10:05
Show Gist options
  • Select an option

  • Save bindiego/07531c8dccd33f5c2c2ca372e0d02bad to your computer and use it in GitHub Desktop.

Select an option

Save bindiego/07531c8dccd33f5c2c2ca372e0d02bad to your computer and use it in GitHub Desktop.
Add images to Gist

Add images to Gist 添加图片到Gist

  1. Create your Gist with some contents, e.g. readme.md file

  2. Clone locally

# with ssh
git clone [email protected]:<hash>.git mygist

# or with https
git clone https://gist.github.com/<hash>.git mygist
  1. Add images to the project
cd mygist

git add *.png # or whatever is applicable in your case

git status

git commit -m "Add images"
  1. Push remote
git push origin master
  1. Access the files
open https://gist.github.com/<username>/<hash>

Raw file

https://gist.githubusercontent.com/<username>/<gist-sha>/raw/<commit-sha>/image1.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment