-
Notifications
You must be signed in to change notification settings - Fork 362
Translate 07-git-tools interactive-staging v2 #164
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
Translate 07-git-tools interactive-staging v2 #164
Conversation
These tools are very helpful if you modify a bunch of files and then decide that you want those changes to be in several focused commits rather than one big messy commit. | ||
This way, you can make sure your commits are logically separate changesets and can be easily reviewed by the developers working with you. | ||
If you run `git add` with the `-i` or `--interactive` option, Git goes into an interactive shell mode, displaying something like this: | ||
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 自带的一些脚本可以使命令行工作更加容易
@networm 已完成 |
@IceNature 已修正。 |
@networm 但是扩折号后面说基本上相同,前面又是much different,不觉得有点冲突了吗? 邮件回复为嘛没有显示……手机没办法添加行注释,只能回复到这了 |
@IceNature 不冲突,就是说你修改的文件还是那几个,但是会以什么样的方式显示出来有所不同,这个视图左侧加了几个 M + - 符号之类的,git status 里面的没有,就这个意思。 |
@networm 明白了 |
If you run `git add` with the `-i` or `--interactive` option, Git goes into an interactive shell mode, displaying something like this: | ||
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.
当你修改一组文件后希望这些改动能放到若干提交而不是混杂在一起成为一个提交时...
@byr-gdp 能将此节完整审校吗? |
These tools are very helpful if you modify a bunch of files and then decide that you want those changes to be in several focused commits rather than one big messy commit. | ||
This way, you can make sure your commits are logically separate changesets and can be easily reviewed by the developers working with you. | ||
If you run `git add` with the `-i` or `--interactive` option, Git goes into an interactive shell mode, displaying something like this: | ||
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 自带的一些脚本可以使在命令行下工作更容易。
You have a lot of options at this point. | ||
Typing `?` shows a list of what you can do: | ||
这时有很多选项。 | ||
输入 `?` 显示所有可以做的列表: |
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.
输入 ?
显示所有可以使用的命令列表:
@jeffsui 已修正。 |
2+=== 交互式暂存 +Git 自带一些让命令行运行更简单的脚本。 |
Git 也可以暂存文件的特定部分。 | ||
例如,如果在 simplegit.rb 文件中做了两处修改,但只想要暂存其中的一个而不是另一个,Git 会帮你轻松地完成。 | ||
从交互式提示符中,输入 `5` 或 `p`(补丁)。 | ||
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 会询问你想要部分暂存哪些文件;然后,对已选择文件的每一个部分,它都会一个个地显示文件区别并询问你是否想要暂存它们:
@@ -53,8 +53,8 @@ Update>> 1,2 | |||
Update>> | |||
---- | |||
|
|||
The `*` next to each file means the file is selected to be staged. | |||
If you press Enter after typing nothing at the `Update>>` prompt, Git takes anything selected and stages it for you: | |||
每个文件前面的 `*` 意味着这个文件将会被暂存。 |
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.
我觉原文翻译的没问题,你这个说法更容易理解一点。
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.
同意
@M1sery 已修正。 |
Translate 07-git-tools interactive-staging
@IceNature @jeffsui @M1sery 已合并入主干。 |
@networm 好的! |
No description provided.