Git is a famous distributed version control system.
Preparation
git config --global user.name "Your Name"
git config --global user.email you@example.com
Initialize
git init
Add remote repo
git remote add origin git@github.com:username/repo.git
Add files to staging area
git add .
Record a new permanent snapshot
git commit
You can use -m
to specify the comment.
git commit -m "Update xxx file."
Use --allow-empty-message
to make an empty comment.
git commit --allow-empty-message -m ""
Push
git push origin master
Pull
git pull origin master