快照是原子的意味着什么?

时间:2015-09-23 22:03:02

标签: git version-control

在以下命令和解释中,限定符“ atomic ”在 atomic 快照中的含义是什么“?我从上下文中得出的最佳猜测类似于粒度?

git reset <commit>

# Move the current branch tip backward to <commit>, reset the staging 
# area to match, but leave the working directory alone. All changes made 
# since <commit> will reside in the working directory, which lets you 
# re-commit the project history using cleaner, more atomic snapshots.

1 个答案:

答案 0 :(得分:1)

# since <commit> will reside in the working directory, which lets you 
# re-commit the project history using cleaner, more atomic snapshots.

在这种情况下,我认为你的意思是你可以将HEAD重置为之前的一些提交,然后将所有后续更改压缩到一次提交中。提交是git存储库中最小的更改单元,通常需要一个提交,其中包含将一些工作添加到存储库所需的所有更改。