Git 简明教程

Git - Life Cycle

在本章中,我们将讨论 Git 的生命周期。在后面的章节中,我们将介绍每个操作的 Git 命令。

In this chapter, we will discuss the life cycle of Git. In later chapters, we will cover the Git commands for each operation.

一般工作流程如下 −

General workflow is as follows −

  1. You clone the Git repository as a working copy.

  2. You modify the working copy by adding/editing files.

  3. If necessary, you also update the working copy by taking other developer’s changes.

  4. You review the changes before commit.

  5. You commit changes. If everything is fine, then you push the changes to the repository.

  6. After committing, if you realize something is wrong, then you correct the last commit and push the changes to the repository.

以下是工作流程的图片表示。

Shown below is the pictorial representation of the work-flow.

life cycle