Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub is a web-based Git repository hosting service. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.
Open Terminal, and follow the steps below skip step 1~2.
- Download Github Desktop for Windows
- Open Github Shell
Config global setting
git config --global user.name "Jerry Shao"
git config --global user.email "firstname.lastname@example.org"
Generate your ssh key
ssh-keygen -t rsa -C "email@example.com"
Copy your ssh key
Once your github account has been created, go to Settings - SSH&GPG Keys page, paste your ssh key as a new record.
Create a new repository on github.
Create your project folder
Initialize as a git project
Copy your github repository address
git remote add origin "your github repo address"
Create a new file
echo "This is my first git project" >> READEME.MD
Add this file into your project temp storage
git add .
Commit this file
git commit -m "This is my first commit"
-m: message for this commit.
git push origin master
Once you finish these steps, your first git project is ready to view on github.