Git - Basic Git Workflow

Posted David

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git - Basic Git Workflow相关的知识,希望对你有一定的参考价值。

Definition

Git is a software that allows you to keep track of changes made to a project over time.  Git works by recording the changes you make to a project, storing those changes, then allowing you to reference them as needed.

 

 Git project can be thought of as having three parts:

  1. Working Directory: where you‘ll be doing all the work: creating, editing, deleting and organizing files
  2. Staging Area: where you‘ll list changes you make to the working directory
  3. Repository: where Git permanently stores those changes as different versions of the project

 

Use Git commands to help keep track of changes made to a project:

  • git init creates a new Git repository
  • git status inspects the contents of the working directory and staging area
  • git add adds files from the working directory to the staging area
  • git diff shows the difference between the working directory and the staging area
  • git commit permanently stores file changes from the staging area in the repository
  • git log shows a list of all previous commits

 

以上是关于Git - Basic Git Workflow的主要内容,如果未能解决你的问题,请参考以下文章

Git Workflow

[Git] An efficient GIT workflow for mid/long term projects

sh git workflow:创建一个新项目

sh git workflow:开发一个新功能

GIT 分支

jenkins 安装git插件的那些坑