git init
git remote add origin git@github.com:Leif160519/centos-script.git
git add . //gaa
git status //gst
git commit -m '提交信息’ //gcmsg '提交信息’
git push --set-upstream origin master //第一次这个命令,以后直接git push //gp <分支名>
git log -line //查看所有commit信息
git reset <hash>回滚代码
git merge //gm 合并
git checkout -b <分支名>//gco 创建并切换到当前分支
gco <分支名> 切换分支
git pull <远程分支名> //拉取代码并合并gpl
git fetch <远程分支> //拉取不合并分支
git diff //列举修改的部分
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:Git用法:将本地代码提交到远程仓库