Skip to content

Instantly share code, notes, and snippets.

@philshem
Forked from remarkablemark/how-to-add-image-to-gist.md
Last active August 25, 2020 19:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philshem/71507d4e8ecfabad252fbdf4d9f8bdd2 to your computer and use it in GitHub Desktop.
Save philshem/71507d4e8ecfabad252fbdf4d9f8bdd2 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  1. Create or find a gist that you own.

  2. Clone your gist (replace <hash> with your gist's hash):

    # with ssh
    git clone git@gist.github.com:<hash>.git mygist
    
    # with https
    git clone https://gist.github.com/<hash>.git mygist
  3. Change to your gist’s directory:

    cd mygist
  4. Add and commit the image:

    git add tulip.jpg
    git commit -m "Add tulip to gist"
  5. Update remote:

    git push origin master

See blog post.

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment