I am moving my website to Github Pages, but have made a mistake in not keeping the same folder names. Instead I just uploaded every file to the main repository. My repository is here : https://github.com/akinhwan/akinhwan.github.io
I am aware of how to change the file directories of text files, by clicking the edit icon and adding a root name and "/". However image files do not appear to have this option.
How might I use github, git shell or github desktop to move my many image files to a subfolder /img so that my html will be able to find my image files?
Thanks everyone!
To do this using command-line git,
git clone https://github.com/akinhwan/akinhwan.github.io to download a local copy of the repository, then cd akinhwan.github.io to go into that directory.img by running mkdir img.
git mv *.jpg *.png *.gif img/
git mv file.png destination/
git status to see what you have changed), run git commit -m 'Move image files to /img' or similar to make a new commit which moves your files to their correct locations.git push and entering your credentials.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With