What is it?
A commit is a recorded snapshot of selected changes in a Git repository.
It records what changed at a point in time and adds that change to the repository history.
A recorded snapshot of selected changes in a Git repository.
A commit is a recorded snapshot of selected changes in a Git repository.
It records what changed at a point in time and adds that change to the repository history.
Think of a commit as a save point with a note.
The save point records the selected changes. The note explains what the change was for.
A commit can:
Commits are used in:
git status
git add .
git commit -m "Add order validation"Git records the selected code changes as a commit.
A commit turns selected changes into a named point in repository history.
Records selected changes in repository history.
Points to a line of development made from commits.
Hosts Git repositories and collaboration features.
A commit is a recorded change; it is not the repository host or the line of development.
| ENGLISH TERM | 中文 | SIMPLE ENGLISH | 中文小白理解 |
|---|---|---|---|
| Commit | 提交 | A recorded snapshot of selected changes. | 把选中的代码变化记录成一个快照。 |
| Git | Git 版本控制 | A tool used to track changes in source code. | 用来记录和管理代码变化的工具。 |
| Repository | 代码仓库 | A project folder tracked by Git. | 由 Git 管理、保存项目代码和历史记录的地方。 |
| Working Files | 工作文件 | Files currently being edited in a project. | 开发者正在修改的项目文件。 |
| Staged Changes | 暂存的变化 | Changes selected for the next commit. | 已经选好、准备放进下一次提交的代码变化。 |
| Commit Message | 提交说明 | A short description of the change. | 用一句话说明这次提交改了什么。 |
| Repository History | 仓库历史 | The ordered record of commits in a repository. | 仓库中按顺序保存的提交记录。 |
| Branch | 分支 | A line of development made from commits. | 由一串提交组成的一条独立开发线路。 |
| GitHub | GitHub 代码托管平台 | A service for hosting Git repositories and collaboration. | 用来托管 Git 仓库并支持团队协作的平台。 |
| Push | 推送 | Sending local commits to a remote repository. | 把本地提交发送到远程仓库。 |
A commit is a recorded snapshot of selected changes in a Git repository.
Commits build the repository history that teams can review, compare, and use for later work.
Final:
Selected Changes → Commit → Repository History