使用Git在团队内共享配置信息
Git的本地的仓库:working directory, staging area, repository
初始化Git
git config --global user.name <>
git config --global user.email <>
创建Git仓库
git init
Git命令
git status
// working directory -> staging area
git add <filename>
git add . // all
// staging area -> repository
git commit -m "<information>"
// log
git log (--oneline)
// diff working directory and staging area
git diff
// rollback, changes out of stage
git reset
// back to the latest commit
git reset --hard
// back to the pointed version
git reset --hard <commit ID>
创建远程仓库并推送
git remote add <remote repository's name> <url>
git push -u <remote repository'name> <local repository'name>
将远程仓库克隆到本地仓库
git clone <url>
将远程仓库中的修改推送到本地
git pull
确认分支状态,创建新分支
git branch
git branch <new branch's name>
在分支之间切换
git checkout <branch's name>
放弃完美主义,执行力就是限时限量认真完成