Search code examples
githubimage-uploading

How to upload images like png into GitHub repository?


I'm a newbie to Git or GitHub, and didn't find how to upload an image file into my repo in Git? Any idea?


Solution

  • You need to add and commit the png file to your local repo first. Then push the updates to the remote server.

    git add xxx.png
    git commit -m 'add png file'
    git remote add origin https://github.com/xxx.git
    git push -u origin master