-
Create a gist if you haven't already.
-
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 [email protected]:<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
-
-
Save mroderick/1afdd71aa69f6b29601d335751a1a9be to your computer and use it in GitHub Desktop.
Nice, i once tried to copy paste the bytes and it didnt work ofc
You can also just convert image to SVG...
so easy in hindsight - thanks Morgan!
Hi,
Easier would be to comment your Gist and add an image there.
Copy past the image in your gist. image
Hi,
Easier would be to comment your Gist and add an image there.
Copy past the image in your gist. image
Even easier - thanks iMhack
Hi,
Easier would be to comment your Gist and add an image there.
Copy past the image in your gist. image
Hi, Easier would be to comment your Gist and add an image there. Copy past the image in your gist. image
Awesome
Not working for me:
> git push origin main
remote: Permission to write to gist denied.
The requested URL returned error: 403
Just push in master branch
Just push in master branch
There is no master branch. It is named main
in this case.
Did a search for this info and, look, it's you!
Friend, thank you for how you give back to the community and to us learners! Big hugs!
Not working for me, unfortunately:
sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://gist.github.com/a64609f7e46dc52776685ba86a8e3005.git'
sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git branch
* main
sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git push origin main
Username for 'https://gist.github.com': steinarb
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://gist.github.com/a64609f7e46dc52776685ba86a8e3005.git/' not found
sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$
Not working for me, unfortunately:
sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git push origin master error: src refspec master does not match any error: failed to push some refs to 'https://gist.github.com/a64609f7e46dc52776685ba86a8e3005.git' sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git branch * main sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$ git push origin main Username for 'https://gist.github.com': steinarb Password for 'https://[email protected]': remote: Repository not found. fatal: repository 'https://gist.github.com/a64609f7e46dc52776685ba86a8e3005.git/' not found sb@marquez:/tmp/a64609f7e46dc52776685ba86a8e3005$
@steinarb You have to use only git push
without the origin master
Ah! Thanks!
Legit! The comment drop technique is wonderful.
Hi, Easier would be to comment your Gist and add an image there. Copy past the image in your gist. image
you cannot be serious.... 💀💀💀💀
I kept having weird auth issues with https. When it would try to auth me with Github in the browser, I would just get a 404.
I switched to ssh (fyi you must create an ssh key and add the public key to Github settings), remembering to change the repo remote, e.g.
git remote set-url --push origin [email protected]:<some_gist_hash>.git
This worked, and I was able to commit and push images to the gist repo.
If you get an error saying:
error: src refspec master does not match any
error: failed to push some refs to 'https://gist.github.com/<hash>.git'
Since your repository has a branch named "main", you should push your changes to that branch instead of "master". To push to the "main" branch, use the following command:
git push origin main
This command will push the changes in your local "main" branch to the remote repository.
^ Agreed, change from git push origin master
to git push origin main
.
The command with ssh is:
git clone [email protected]:HASH.git
Any idea if this can be done with octokit's rest api?