

Storing Images and Demos in your Repo
source link: https://gist.github.com/joncardasis/e6494afd538a400722545163eb2e1fa5
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Storing Images and Demos in your Repo
In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.
How to
1. Clone a fresh copy of your repo
In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.
2. Create a new branch
Create a new branch in your repo by using git checkout --orphan assets
This will create and switch you to a new branch called "assets". The --orphan
flag creates a new branch but without any prior commits. However it does still keep the working tree and index.
3. Remove files from the working tree
git rm -rf .
THIS WILL DELETE ALL FILES THAT THE WORKING TREE RECOGNIZES Any files that were not added to the tree will remain left behind in the folder.
We remove all files from the working tree since we do not want anything but our screenshots and images in this branch.
You can also check what branch you are on anytime by using git branch
. The branch with the *
next to it is the current branch.
4. Add your images and screenshots and commit the change
git add screenshot.png demo.gif logo.png
git commit -m "Added Assets"
4. Finally push your changes
git push origin assets
Use the images in your README
You can now use

in your README to have the gif display on your master's readme.
Recommend
-
57
Why would you want to know more about different ways of storing and accessing images in Python? If you’re segmenting a handful of images by color or
-
17
Storing Images in a PowerBI/Analysis Services Data Models As some of you probably remember, when PowerPivot was still only available in Excel and Power Query did not yet exist, it was possible to load images from a...
-
9
Storing JSON in Your Databases: Tips and Tricks For MySQL Back to the Blog
-
6
Back to the Blog JSON Structure, The Next Generation (Performance, Scale, and Fun)
-
3
The Middle Class Privilege Of Storing Your ShitCan we ever really be adults if we don’t have space for our American birthright, a rusty coffee cans full of nails?I moved from Seattle to Portland fo...
-
7
Clearview AI fined in UK for illegally storing facial imagesShiona McCallum - Technology reporterTue, May 24, 2022, 12:11 AM·4 min read
-
6
Storing JSON In Your SQL Database Is Just Fine NoSQL, SQL, or NewSQL? Those database types and the concepts they are based on are not mutually exclusive, even though some dogmatists try to make you think otherwise. ...
-
6
As an Ubuntu user, I find myself typing apt install ... frequently as a way to install software on my system. But what if I wanted to distribute my code to others via an apt repository? In this post I’ll cover how to 1) create a deb p...
-
8
Cubot P80 – The Ultimate Smartphone for Capturing and Storing Your memories
-
7
Next Up Cars Best Electric SUVs Of 2023
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK