Skip to content

Translate 07-git-tools reset v2 #168

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

Merged
merged 4 commits into from
Aug 10, 2015
Merged

Conversation

networm
Copy link
Member

@networm networm commented Jul 3, 2015

No description provided.

@networm networm changed the title Translate 07-git-tools reset Translate 07-git-tools reset v2 Jul 3, 2015
These commands are two of the most confusing parts of Git when you first encounter them.
They do so many things, that it seems hopeless to actually understand them and employ them properly.
For this, we recommend a simple metaphor.
在继续到更特定的工具前,让我们讨论一下 `reset` 与 `checkout`。
Copy link
Contributor

Choose a reason for hiding this comment

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

“在继续了解更专用(专业?)的工具前,我们先讨论一下 resetcheckout。”

Copy link
Contributor

Choose a reason for hiding this comment

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

同意”专业“。

@networm networm mentioned this pull request Jul 29, 2015
95 tasks
@networm networm modified the milestone: v1.0.0 Jul 29, 2015
@@ -46,15 +46,15 @@ $ git ls-tree -r HEAD
040000 tree 99f1a6d12cb4b6f19... lib
----

The `cat-file` and `ls-tree` commands are ``plumbing'' commands that are used for lower level things and not really used in day-to-day work, but they help us see what's going on here.
`cat-file` `ls-tree` 命令是底层命令,是用于底层事物并不在日常工作中使用,但是它们帮助我们看到这里发生了什么。
Copy link
Contributor

Choose a reason for hiding this comment

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

cat-filels-tree 是底层命令,他们一般用于底层工作,在日常工作中并不使用。不过它们能帮助我们了解到底发生了什么。

It would be exactly like `git reset --hard [branch] file` (if `reset` would let you run that) – it's not working-directory safe, and it does not move HEAD.
另外运行 `checkout` 的方式是有一个文件路径,像 `reset` 一样,不会移动 HEAD
它就像 `git reset [branch] file` 那样用那次提交的那个文件来更新索引,但是它也会覆盖工作目录中的那个文件。
它就像是 `git reset --hard [branch] file`(如果 `reset` 允许你那样运行)- 这不是工作目录安全的,它也不会移动 HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

它就像是 git reset --hard [branch] file(如果 reset 允许你这样运行的话)- 这样对工作目录并不安全,它也不会移动 HEAD。

@Geno1024
Copy link
Contributor

Geno1024 commented Aug 9, 2015

审阅之前先膜拜一下@OlingCat ,没看错的话 143 行有 135 个提议……扑通

No matter what form of `reset` with a commit you invoke, this is the first thing it will always try to do.
With `reset --soft`, it will simply stop there.
不论调用了任何形式的有一个提交的 `reset`,这都是它始将尝试去做的第一件事。
使用 `reset --soft`,它将会只是停在那儿。
Copy link
Contributor

Choose a reason for hiding this comment

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

它将仅仅停在那儿。

……话说终于找到一个没有 note 的行了。。。

@Geno1024
Copy link
Contributor

Geno1024 commented Aug 9, 2015

@networm 已审核完毕,并提出 13 个修改意见。

@networm
Copy link
Member Author

networm commented Aug 10, 2015

@OlingCat @IceNature @Geno1024 已修正。

@@ -46,15 +46,15 @@ $ git ls-tree -r HEAD
040000 tree 99f1a6d12cb4b6f19... lib
----

The `cat-file` and `ls-tree` commands are ``plumbing'' commands that are used for lower level things and not really used in day-to-day work, but they help us see what's going on here.
`cat-file` `ls-tree` 是底层命令,他们一般用于底层工作,在日常工作中并不使用。不过它们能帮助我们了解到底发生了什么。
Copy link
Contributor

Choose a reason for hiding this comment

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

他们 => 它们

@OlingCat
Copy link
Contributor

@networm 修订完毕,改完差不多可以合并了。

@networm
Copy link
Member Author

networm commented Aug 10, 2015

@OlingCat 已修正。

networm added a commit that referenced this pull request Aug 10, 2015
@networm networm merged commit 09bc1d5 into progit:master Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants