How to Store Images on GitHub ?

how-to-store-images-on-github-?

In this quick walk-through you’ll learn how to create a separate branch in your repo to store your screenshots and demo gifs for use in your master’s readme.

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
![Demo Animation](../assets/demo.gif?raw=true)
in your README to have the gif display on your master’s readme.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
crypto-bot

Crypto Bot

Next Post
meet-the-next-generation-blogging-platform

Meet the next generation blogging platform

Related Posts
役員変更登記

役員変更登記

2025-05-08 申請用総合ソフトで行う アカウントは個人で OK(法人用は特にない) 登記申請書(法人等用)を使う 参考 https://www.touki-kyoutaku-online.moj.go.jp/toukinet/taiken/taiken_zeninjuunin.html https://houmukyoku.moj.go.jp/homu/shogyo_online03.html 法人番号で検索した住所のハイフンが外字扱いだったので、直接入力に切り替えて入力した 電話がかかってきて以下のような文言修正を要求された 添付ファイルに電子署名が必要 議事録の「第 2 号議案:代表理事の重任について」を「第 2 号議案:理事及び代表理事の重任について」 同様に「任期満了に伴い、鈴木健志を理事及び代表理事に再任することを決議した。」 「なお席上就任を承諾した。」の文言を追加。同意書なしのため必要らしい。…
Read More