Sign up for a GitHub account
https://github.com/
To install the Git tool:
https://git-for-windows.github.io/
Once the above preparations are complete, start the operation now.
First, go to GitHub home page, click "New Repository" button, create a new warehouse.
Second, fill in the relevant information, click the "Create Repository" button, the warehouse was created successfully, we use the warehouse name is NewObject
Third, next, we will enter the following interface
Copy the tagged link "https://github.com/minigrasshopper/newObject.git" in the diagram (everyone's not the same yo)
Iv. The new folder "Testgit" is used to store the code. In the "Testgit" folder, right-click, select "Git Bash here" and go to the window below
Cloning the GitHub repository to a local
command line execution git clone https://github.com/minigrasshopper/newObject.git (file address write your own)
After execution, you can see more than one "NewObject" folder in the "Testgit" folder
Vi. Enter the "NewObject" folder
Command line execution CD NewObject
Submit your local code to the GitHub repository
Copy some items to the "NewObject" folder
Then perform the following actions
- Git add # Adds a GitHub repository file to a local
- git commit-m "submit message" # Submit the modified file and fill in the submission information exp:git commit-m "First Commit"
- Git push-u Origin Master # Push the local repository to GitHub, this step requires you to enter your account and password
That's it, guys, thanks for the guidance.
Upload your project to GitHub using the Git tool