终于,我们公司也抛弃了svn,走上了git 的道理了。
首先,参考了这里,所有的关于git 的东西咱们都可以在这里看到。
一个文件在git 中的四个阶段
- workspace
- index
- local repository
- remote repository
sequenceDiagram
workspace ->> index : git add filepath
index ->> local repository : git commit -m 'message'
local repository ->> remote repository : git push
index ->> workspace : git reset --staged
local repository ->> workspace : git reset --soft
remote repository -->> local repository : git fetch
local repository -->> workspace : git checkout HEAD
remote repository -->> workspace : git pull or git rebase