To host to GitHub, you should have a GitHub account that belongs to you, so you should go to github.com to register
Open your browser
Enter address in address field: github.com
Fill in the user name, email, password
Simply register by clicking Sign Up
- 2
Complete the registration and go to the GitHub platform,
Click New repositories
Create a new project (you can also add to an existing project)
- 3
The operation of the new project, in fact, is very simple, enter the project name can directly create the
- 4
At this time the interface, I think everyone should be very familiar with. Click the Clipboard icon in the right column to record your project address.
END
Method/Step 2 upload project to GitHub
- 1
First, you need to install a GIT client on your local computer.
You can either use the GitHub client directly or use the other.
Because I use msysgit, so here with Msysgit as introduction (Msysgit is also one of the most extensive and practical tools at present).
Open it
Msysgit.github.io
Download and install the latest version of Msysgit
When the installation is complete, go to the root directory of the project you want to host,
Right-click to start the git bash command line
As shown
- 2
Enter Git clone and then copy the previously recorded address to the back, enter
- 3
Copy all files and folders from the downloaded project folder, including the. git folder, to the root directory of your managed project (or copy your managed project to the directory)
CD test
Enter the root directory of the managed project.
- 4
Input
git Add.
Add changes to the version manager
- 5
Input
git commit-m "Changes log"
Submitted to the local version control repository,
The quotation marks are the information you have about this submission.
- 6
Last input
Git push-u Origin Master
Submit your local repository to your GitHub account,
You will be asked to enter your GitHub account number and password.
- 7
Go back to the project page in your github.com.
Has the file been changed?
So far
The GitHub project has been successfully updated.
More github operations, you can slowly experience yourself. But with this first step, I'm sure you'll find it much easier to grope later.
END
Precautions
- When you use Git for the first time, you'll be asked to enter your user information, which is consistent with your GitHub.
- Update the project in GitHub to your local directory you need git fetch, all in a backward order.
- In the process of downloading or uploading, it is recommended that you do not disconnect your network, you have to wait patiently, so as not to cause some bad trouble
- Specific git instructions for self-viewing help
Get started with GitHub upload code quickly