Skip to content

Instantly share code, notes, and snippets.

@remarkablemark
Last active October 23, 2022 08:55
Star You must be signed in to star a gist
Save remarkablemark/feff40b0a522f0c41c4eff0b77ea1d47 to your computer and use it in GitHub Desktop.
  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.

@vaimalaviya1233
Copy link

i have a question instead of picture can i add .zip file which is less than 5-10MB?

@xurizaemon
Copy link

xurizaemon commented Dec 31, 2020

@vaimalaviya1233 You should try it on a gist of your own and find out! If that doesn't work, you can download a gist as a zip file - so you might use that to share a set of files, with some limitations (eg if you don't need a directory structure in the zip). Good luck!

@vaimalaviya1233
Copy link

You should try it on a gist of your own and find out! If that doesn't work, you can download a gist as a zip file - so you might use that to share a set of files, with some limitations (eg if you don't need a directory structure in the zip). Good luck!

Thaks

@blurymind
Copy link

can we do this without file system access and by using the REST api instead? I need to be able to do it from a mobile pwa

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