Created
February 12, 2019 11:11
-
-
Save igorbrigadir/889489ed98e5c6e4a16a72e04f03675d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # [How to add an image to a gist](https://remarkablemark.org/blog/2016/06/16/how-to-add-image-to-gist/) | |
| 1. Create or find a [gist](https://gist.github.com) that you own. | |
| 2. Clone your gist (replace `<hash>` with your gist's hash): | |
| ```sh | |
| # with ssh | |
| git clone [email protected]:<hash>.git mygist | |
| # with https | |
| git clone https://gist.github.com/<hash>.git mygist | |
| ``` | |
| 3. Change to your gist’s directory: | |
| ```sh | |
| cd mygist | |
| ``` | |
| 4. Add and commit the image: | |
| ```sh | |
| git add tulip.jpg | |
| git commit -m "Add tulip to gist" | |
| ``` | |
| 5. Update remote: | |
| ```sh | |
| git push origin master | |
| ``` | |
| See blog [post](https://remarkablemark.org/blog/2016/06/16/how-to-add-image-to-gist/). | |
| ``` | |
| #YOURGISTID is in the gist URL: https://gist.github.com/USERNAME/GISTID | |
| GIST=GISTID | |
| git clone https://gist.github.com/$GIST.git | |
| #MYBINARYFILENAME is something like mydata.zip or myimage.zip | |
| cp MYBINARYPATH/MYBINARYFILENAME $GIST/ | |
| cd $GIST | |
| git add MYBINARYFILENAME | |
| git commit -m MYCOMMITMESSAGE | |
| git push origin master | |
| #If prompted, provide your Github credentials associated with the gist | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment