How to add an image to a gist

How to add an image to a gist

October 15, 2021

Initialize git:

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Git 101

How to add an image to a gist Create a gist if you haven’t already.

How to add an image to a Gist

Clone your gist:

# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https 
#git clone https://gist.github.com/c043e6645a8786f55640e5fbccbaea00.git
git clone git@gist.github.com:<hash>.git     # or with ssh
#Add your image to your gist's repository:

git add your-image.jpg
#Commit the image:

git commit -m "Add image"
#Update gist:

git push origin master