git config --global user.name "test" git config --global user.email "test@a.com" cd ~/.ssh ssh-keygen -t rsa -C "test@a.com"
git clone http..xxx.git //克隆項目 git pull orign master //拉取主分支最新代碼 git add --all //添加代碼 git commit -m "desc" //提交代碼 git push origin master //代碼推送,主分支 git push origin mybranch //代碼推送,本身的分支 git checkout -b newbranch //新建分支 git checkout oldbranch //切換分支 git branch //查看當前全部分支 git status //查看代碼提提交的狀況 git merge origin/otherbranch //將其餘分支合併到當前分支
更多命令,用到再加,哪裏不對的,歡迎勘誤git