Git 中的变更集是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38648491/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:08:53  来源:igfitidea点击:

What is a changeset in Git?

git

提问by developer098

What is changeset in Git? I keep hearing this term said, but cannot seem to find the answer online, and wikipedia is very vague. Is it if you commit 5 files at once via a git repository and type git log and see a single commit for that 5 files, that entire change is called a changeset?

Git 中的变更集是什么?我一直听到这个词说,但似乎无法在网上找到答案,而且维基百科很模糊。如果您通过 git 存储库一次提交 5 个文件并键入 git log 并查看这 5 个文件的单个提交,那么整个更改是否称为变更集?

commit 01304a265f5d8f9bfd6eb64d3390846adc61db75
i.e.:Author: Some guy <[email protected]>
Date:   Thu Jul 28 18:28:07 2016 -0400

First commit

This entire thing would be a changeset?

这整个事情将是一个变更集?

采纳答案by gran_profaci

As was mentioned by the other folks as well, a changesetis essentially one indivisible change. Indivisible simply means that a changeset is one single value in the stack of changes that are being made on a codebase. For example, if you look at a commit, you can check what individual files were modified, what was the previous state of the codebase and after, which would make it adhere to what a changeset is.

正如其他人也提到的,变更集本质上是一个不可分割的变更。不可分割只是意味着变更集是在代码库上进行的变更堆栈中的一个单一值。例如,如果您查看提交,您可以检查修改了哪些单个文件,代码库的先前状态和之后的状态,这将使其符合变更集的内容。