This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
学习 | |
非线性写作 | |
碎片知识聚合 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
谷歌翻译的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
有两个因素会影响他们的长期成功,某些毕业生会格外成功,一是他们不断地提问,二是他们相信自己。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone 自动添加了远程仓库,命名为origin | |
git fetch 拉取到本地仓库(.git),并不合并。以后需要手工合并 | |
git pull 自动合并远程分支到本地分支 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch命令是从远程取数据,但是存放到.git目录中。通过观察.git的容量得到的结论。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git commit -m 'initial commit' | |
它会使用后面参数指定的文字。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
它是要从物理上删除文件 | |
如果不想删除,只想不被跟踪,加参数--cached | |
例如: git rm --cached README | |
最后是文件名。 | |
这样,就把文件从监视目录去掉。 | |
以后再用命令 git rm是不可以删除它的。 | |
这说明,git rm只针对进入数据库系统中的 | |
可以物理上存在的文件理解为两部分:一部分是被监视的,一部分是不被监视的。 | |
可以通过git add把不被监视的加入进到被监视的部分。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
跳过git add | |
可能这个a是这么来的。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/huangblue/codeparkshare 将fork的项目克隆到本地 | |
git remote add codeparkshare https://github.com/Yixiaohan/codeparkshare 添加远程仓库(fork的原仓库) | |
git commit 提交本地变更 | |
git remote update 更新原仓库 | |
git checkout master 检出本地分支 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
其实这个快照是三个部分的合成:数据库、工作区和暂存区。 | |
它们构成了数据的全貌。 | |
没有改的文件在数据库,改了的文件在工作区,而暂存区存放有指向它们的链接。 | |
说明一个问题:当修改文件时,文件从数据库移动到了工作区,但是只是一个副本。 | |
改完了,要执行git add,数据库中的文件才会消失。 | |
这时,由暂存区的链接和工作区的被修改了的文件,构成了对这个文件的跟踪。 | |
就是说,数据库始终放的是 没有修改的文件。 | |
执行git commit后,被修改的文件放到了数据库,暂存区的相关链接消失,工作区相关文件消失。 | |
NewerOlder