-
Notifications
You must be signed in to change notification settings - Fork 362
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
Conversation
注意一个问题,提交的 Pull Request 右上角显示的增加删除行数应是一致的。 |
更新了下内容,现在中文翻译行数和英文原文行数一致了。 |
和其它版本控制系统一样,当某些重要事件发生时,Git 会调用自定义的脚本。 | ||
有两组这样的钩子:客户端的和服务器端的。 | ||
客户端钩子由诸如提交和合并这样的操作所调用,而服务端钩子作用于诸如接收被推送的提交这样的联网操作。 | ||
你可以随心所欲地活用这些钩子。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
活用=》运用
@spacewander 已完成 |
@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 会调用自定义的脚本。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+和许多其他的版本控制系统一样,Git会在重要的特定事件触发后调用自定义脚本。
occur翻译成 触发好一点.
There was a problem hiding this comment.
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` 差不多。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个钩子的用途 很大程度上 跟 post-checkout
和 post-merge
差不多。
@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` 钩子运行于变基之前,以非零值退出可以中止变基的过程。 | ||
你可以使用这个钩子来禁止对已经推送的提交做变基。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+你可以使用这个钩子来禁止对已经推送的提交做变基。?
+rebasing该怎么来翻译?探讨一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要不直接译为“变基”好了?
“变”是动词,“基”是名词,“变基”看上去像是动名词组。如果前面再加个“做”,确实有点不伦不类。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同意
@spacewander @networm #139 钩子这章我已完成审校。 |
@M1sery |
@spacewander @networm 重新看了一遍,觉得要改的地方都更新了,我这边没有任何异议! |
Translate 08-customizing-git hooks
@spacewander @IceNature @secondwtq @M1sery 已合并入主干。 |
No description provided.