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:
- A Working Directory: where you‘ll be doing all the work: creating, editing, deleting and organizing files
- A Staging Area: where you‘ll list changes you make to the working directory
- A 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 repositorygit status
inspects the contents of the working directory and staging areagit add
adds files from the working directory to the staging areagit diff
shows the difference between the working directory and the staging areagit commit
permanently stores file changes from the staging area in the repositorygit log
shows a list of all previous commits
以上是关于Git - Basic Git Workflow的主要内容,如果未能解决你的问题,请参考以下文章