The local hosting of a project to their GitHub repository

As the world's largest GitHub code hosting platform, it is very powerful. We can build a warehouse in the above picture to host our code and other resources. Because the use markdown syntax to write a blog so it is necessary to insert the picture in a picture outside the chain of address, first go online to find a few pictures outside the chain's website, it is to be a problem, you want to do is to charge money to continue. After a series of setbacks I decided to use GitHub to host my blog picture, though a bit cumbersome, but free is the truth. Just like to take this opportunity to write a host local resources to GitHub repository blog.

First, we need to have a GitHub account and Git command-line tool

  1. The first step we create its own warehouse on GitHub. (But we better not generate README.md initialization file when you create a warehouse)
    is not checked Initialize this repository with a README option, then avoid making mistakes when using git.
    It is good to create an empty warehouse:

  2. Follow the prompts to create a good warehouse

  • First, we create a new folder on the disk
  • File using the git command line tools into the folder you just created
  • Use the following command to become git is this folder can manage the folder
git init
  • README.md best to create a file in a folder manually
  • Use the following command at the file folder to add space to submit (temporary)
git add .
  • Use the following command help content describing your submission (can easily write)
git commit -m '你自己本次提交的描述文字'
  • Use the following command to associate the local folder with a remote repository GitHub
git remote add origin 你的GitHub仓库地址
  • Finally, you use the git addcommand to add files pushed to GitHub repository
git push -u origin master

Guess you like

Origin www.cnblogs.com/yuanchao-blog/p/10991082.html