Skip to content

Translate 08-customizing-git hooks #139

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 1 commit into from
Aug 14, 2015
Merged

Translate 08-customizing-git hooks #139

merged 1 commit into from
Aug 14, 2015

Conversation

spacewander
Copy link
Contributor

No description provided.

@networm
Copy link
Member

networm commented Jul 11, 2015

注意一个问题,提交的 Pull Request 右上角显示的增加删除行数应是一致的。
需要保证英文原文是几行,中文就是几行,不可以随意多行或少行,要保证英文一行中对应的中文翻译都在一行。

@spacewander
Copy link
Contributor Author

更新了下内容,现在中文翻译行数和英文原文行数一致了。

@networm networm mentioned this pull request Jul 29, 2015
95 tasks
@networm networm modified the milestone: v1.0.0 Jul 29, 2015
和其它版本控制系统一样,当某些重要事件发生时,Git 会调用自定义的脚本。
有两组这样的钩子:客户端的和服务器端的。
客户端钩子由诸如提交和合并这样的操作所调用,而服务端钩子作用于诸如接收被推送的提交这样的联网操作。
你可以随心所欲地活用这些钩子。
Copy link
Contributor

Choose a reason for hiding this comment

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

活用=》运用

@IceNature
Copy link
Contributor

@spacewander 已完成

@spacewander
Copy link
Contributor Author

@IceNature
已修订

There are two groups of these hooks: client-side and server-side.
Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits.
You can use these hooks for all sorts of reasons
和其它版本控制系统一样,当某些重要事件发生时,Git 会调用自定义的脚本。
Copy link

Choose a reason for hiding this comment

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

+和许多其他的版本控制系统一样,Git会在重要的特定事件触发后调用自定义脚本。
occur翻译成 触发好一点.

Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得这句话的意思是,Git 可在用户有需要的情况下提供脚本这样一种自定义方式(has a way to),因此我的翻译是:

Git 能在特定的重要动作发生时触发自定义脚本。

触发 应该是 fire off 而不是 occur,是先有事件 发生,之后 触发 脚本)

This hook has many of the same uses as the `post-checkout` and `post-merge` hooks.
`post-rewrite` 钩子被那些会替换提交记录的命令调用,比如 `git commit --amend` `git rebase`(不过不包括 `git filter-branch`)。
它唯一的参数是触发重写的命令名,同时从标准输入中接受一系列重写的提交记录。
这个钩子的用途跟 `post-checkout` `post-merge` 差不多。
Copy link
Contributor

Choose a reason for hiding this comment

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

这个钩子的用途 很大程度上post-checkoutpost-merge 差不多。

@secondwtq
Copy link
Contributor

@spacewander 已审校。

You can use this hook to disallow rebasing any commits that have already been pushed.
The example `pre-rebase` hook that Git installs does this, although it makes some assumptions that may not match with your workflow.
`pre-rebase` 钩子运行于变基之前,以非零值退出可以中止变基的过程。
你可以使用这个钩子来禁止对已经推送的提交做变基。
Copy link

Choose a reason for hiding this comment

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

+你可以使用这个钩子来禁止对已经推送的提交做变基。?
+rebasing该怎么来翻译?探讨一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

要不直接译为“变基”好了?
“变”是动词,“基”是名词,“变基”看上去像是动名词组。如果前面再加个“做”,确实有点不伦不类。

Copy link

Choose a reason for hiding this comment

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

同意

@0xinhua
Copy link

0xinhua commented Aug 13, 2015

@spacewander @networm #139 钩子这章我已完成审校。

@spacewander
Copy link
Contributor Author

@M1sery
@secondwtq
已完成修订

@0xinhua
Copy link

0xinhua commented Aug 14, 2015

@spacewander @networm 重新看了一遍,觉得要改的地方都更新了,我这边没有任何异议!

networm added a commit that referenced this pull request Aug 14, 2015
Translate 08-customizing-git hooks
@networm networm merged commit 1f1a966 into progit:master Aug 14, 2015
@networm
Copy link
Member

networm commented Aug 14, 2015

@spacewander @IceNature @secondwtq @M1sery 已合并入主干。

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.

5 participants