工作区:电脑上存放源代码的文件夹
版本库:工作区有一个隐藏目录.git,这个不算工作区,而是Git的版本库。
.git
版本库包含stage(暂存区),master分支,以及指向master分支的指针叫HEAD
代码提交分为两步:第一步是用git add把文件添加进去,实际上就是把文件修改添加到暂存区;
git add
第二步是用git commit提交更改,实际上就是把暂存区的所有内容提交到当前分支。
git commit
git push,即是将本地修改同步到其他人的分支。