Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ch5): translate 589-973 #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat(ch5): translate 589-973 #54

wants to merge 2 commits into from

Conversation

ksyx
Copy link
Collaborator

@ksyx ksyx commented Feb 26, 2022

No description provided.

@ksyx ksyx changed the title draft: feat(ch5): translate 589-835 feat(ch5): translate 589-835 Feb 26, 2022
@ksyx ksyx marked this pull request as draft February 26, 2022 04:08
@ksyx ksyx marked this pull request as ready for review February 27, 2022 04:14
@ksyx ksyx changed the title feat(ch5): translate 589-835 feat(ch5): translate 589-973 Feb 27, 2022
还是啥都没有
但是我跑 `ls -a`
就会有个隐藏的文件夹 `.git`
* `.` 开头的文件默认隐藏 文件夹是特殊的文件
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `.` 开头的文件默认隐藏 文件夹是特殊的文件
* `.` 开头的文件默认隐藏 文件夹是特殊的文件
* 至于为啥 `.` 开头的文件表示隐藏,最初来源于 ls 的一个 bug

然后你要加一个子命令名作为参数
来指定要看啥的帮助
我现在跑 `git help init`
它就会告诉我 `git init` 的帮助信息
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
它就会告诉我 `git init` 的帮助信息
它就会告诉我 `git init` 的帮助信息
* 另外两种方法是 `git init --help` 和 `man git-init`

节点里面是一个
只有一个文件节点的 blob 树
这个文件节点的文件名叫做 `hello.txt`
里面写有 `hello world` # REVIEW 树套树套..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git 其实是 DAG 套树

Copy link
Collaborator Author

@ksyx ksyx Feb 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

但是他这里说树(
而且 dag 可以转成有根树吧

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

做不到吧,你考虑 merge 的情况,一定可能存在有一个节点有两个父亲的情况,这必不可能是个树

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
里面写有 `hello world` # REVIEW 树套树套..
里面写有 `hello world` # REVIEW DAG套树

学生:这个 `42fb7a2` 是代表一整个树
还是 `hello` 这个功能
#REVIEW 也没说啥树= =
好问题 也就是说这个 hash 到底代表什么
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
好问题 也就是说这个 hash 到底代表什么
好问题 也就是说这个 hash 到底代表什么
* 其实是代表一个 object,可能是 commit、blob 或者 tree,这里代表一个 commit;
* 一个 commit 包含 commit message、作者、签名、parent commit 的指针(也就是 hash,可能有多个,在 merge 那里会提到)和代表 commit 时仓库状态的 tree;
* 一个 tree 包含其所有子节点的指针(即目录下所有文件(tree 和 blob)的指针)和对应节点的名字,也就是说 tree 是 Git 内部对应目录的数据结构;
* 一个 blob 包含一个文件的内容

把 `git add` 和 `git commit` 分开
`git commit` 不对整个目录进行快照
这样设计的原因是
你通常来说并不想把所有东西加入快照 #REVIEW svn 哈哈
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

别啊,SVN 也是可以设置 ignore 的,只是没 Git 灵活

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore 和 stage 还是有区别?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是,所以说没 git 灵活(Git 可以随时随地随意调整,SVN 必须写死在文件里)

@GNAQ GNAQ self-assigned this Apr 27, 2022
@GNAQ GNAQ added 新增翻译 / Add Translation 进行或完成的部分文本翻译 等待审校 / Pending Review 准备就绪,可以 Review 需要时间轴 / Need Timeline 翻译已完成,需要打轴 labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
新增翻译 / Add Translation 进行或完成的部分文本翻译 需要时间轴 / Need Timeline 翻译已完成,需要打轴 等待审校 / Pending Review 准备就绪,可以 Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants