sudo apt-get update
sudo apt-get install git
git config --global user.name "yourname"
git config --global user.email "youremail"
git init
git add .
git commit -m 'first commit'
git remote add origin <你的远程库地址>
git pull --rebase origin master
git push -u origin master
git status
更多Git用法,参见官网:
https://git-scm.com/docs