How to move an image to a folder GitHub - github

I want to move an image in my GitHub repository to a new folder. I know to move a text file you can click the edit icon in the top right but there is no edit icon for pictures. How can I move the picture on GitHub in the browser?

Update: The OP changed the title after my answer. The original question said GitHub Desktop not GitHub Browser - https://stackoverflow.com/posts/52977306/revisions
GitHub Desktop tracks all changes to all files as you edit them directly in the file system.
Just move the files directly using Windows Explorer and commit your changes to the repository using GitHub Desktop after moving the file.
Step-by-step instructions here:
Committing and reviewing changes to your project
You might also be interested in reading the other topics in the documentation, to get up to speed:
https://help.github.com/desktop/guides/contributing-to-projects/

Images are binary data. Adding, removing, and even updating those images can cause unnecessary usage of your repository's space. This is because images, videos, and other binary data are larger than the text files where our code is written. For personal projects, one could use this site (or another) to upload all of your images: https://imgbb.com/. Then URLs of each image will be provided for use anywhere in an app without the need to store those images in an actual repo.

Related

How to store GIFs for a Github README?

I try to include a GIF for my README.md in Github, since Github allows to use and render GIFs in .md files.
As far as I am concerned I often cannot find any image or video files on Repositories of well maintained Github Repositories, but they still can use their own files in their READMEs.
A few examples:
https://raw.githubusercontent.com/junegunn/i/master/fzf.png
https://raw.githubusercontent.com/vim/vim/master/runtime/vimlogo.gif
How can I achieve similar links, without tracking and pushing e.g. GIFs in my Repo on Github?
I tried out the following:
I open an issue in my Repo, drag and drop my .gif file into it, copied the content into my README.md.
This turns out successfully, but i receive an not readable link:
https://user-images.githubusercontent.com/21893471/47281234-9f9b23ff-21ff-88ad-98f1-5555d1239ba807.gif
(dummy link)
I followed this description. It also works, but then an extra branch is created and thus the GIFs will be downloaded as well when someone clones the Repository.
TL;DR; You can't.
Those "readable" links are links directly into content stored in that repository. For example, that Vim image lives in this directory in the code: https://github.com/vim/vim/tree/master/runtime, and will be downloaded by anyone who clones the repository.

github markdown no longer displays images

A month or 2 ago I wrote a markdown file for my github page and it contained png files.
Today I was looking ad the markdown file on github and all images were removed. If I click on one I get the message: The image "link to image" cannot be displayed because it contains errors.
This is the link as the git hub page gives me
https://raw.githubusercontent.com/bask185/State-Machine-Scripts/master/images/handleWheel.png
And this is how I try to display the file in the markdown file.
exclamation mark [handleWheel ] (https://raw.githubusercontent.com/bask185/State-Machine-Scripts/master/images/handleWheel.png)
It worked once so I did something right once. Did github changed or did I do something wrong?
Can I salvage my images?
It looks like the images were linked to a relative path in your repository. You earlier had an images/ directory with the images that were shown in the markdown file, but this was removed in this commit.
If you browse the repository at the previous commit, you can see the images. The image corresponding to the link in your question, for example, is here.
This thread discusses various ways to add images to Markdown files in GitHub.

Display README for GitHub repository based on Operating System

Background:
When you land on a GitHub repository page on the website, it automatically renders the README.md file that lives on the root.
Question:
I want to have a separate one for iOS and Windows, and display the appropriate one based on the operating system the page is viewed on/from. Is this something you could do?
My current in-mind solution is to just have a super large file with clickable tags for the iOS and Windows sections, so that a user can click and jump to that section - this is not ideal though, as this file would grow extremely large (it is used as a setup guide).
I don't believe it's possible to show a different README based on the viewer's OS, and I believe that's a good thing. I've frequently had to look something up on one device and use it on another.
What's to say a user wouldn't need to look up the Windows instructions from their iPhone?
My current in-mind solution is to just have a super large file with clickable tags for the iOS and Windows sections, so that a user can click and jump to that section - this is not ideal though, as this file would grow extremely large (it is used as a setup guide).
This sounds like a good solution to me, though you're right that it could get unwieldy if you've got a lot of content.
Why not use GitHub's wiki feature for detailed documentation? Windows and iOS could each have their own page, or pages. Your README can still contain some basic information and link to the wiki.
Alternatively, you could publish a website using GitHub Pages using content from a dedicated gh-pages branch or a docs/ directory in your master branch.

Unedited files not showing up in repository?

Very new to Github and I downloaded the desktop application in hopes of understanding it better. What I'm trying to do is commit/push files by dragging them into my repository folder, but they don't show in application when moved? I tried editing a txt file and as soon as I save it, it appears. I don't want to have to edit every file I add to my repository as I edit it elsewhere. How do I make the non-edited, dragged-and-dropped files appear?
Also, is there an official GitHub support forum? I can't find anything on their website where you can ask questions/etc and I'm not sure StackOverflow is the best place for this question.
Thanks!
That's the way how git works. It doesn't make sense to add every time the unedited files.
When it notices you added/edited/removed files, git will know that.
I pasted a file (blocks.gif) in my repository and in GitHub Desktop it I see the following (click the 1 uncommitted change) and you should see the new files there. Then you can write a commit message and commit the changes.
Also, is there an official GitHub support forum?
When you need help using GitHub, you can always contact the support team (or write an email to support#github.com). They are awesome people. :)
https://github.com/contact

Use github website purely - upload to add files

I'm trying to purely use the website Github to create a repo, then public first commit. (Because I cant install the desktop client on this computer, nor use the command line, school restrictions)
I found a little cheat, I clicked the "make readme" button then renamed that file to make the first commit.
I created a screncast here:
Youtube :: Use Github without the Desktop App
After that I can create new text based files by clicking "+" button and create subdirectories too. But I don't know how to upload image, other text based files, or other non-text files to the repo using just the website. Does anyone know?
GitHub's web interface isn't designed as a complete Git solution. It allows you to do a subset of the operations you could do in a local clone, including just about every part of GitHub Flow.
Their documentation about adding files only covers adding text files using the online editor, which you have already discovered. I don't believe that it supports uploading files.