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 initcreates a new Git repositorygit statusinspects the contents of the working directory and staging areagit addadds files from the working directory to the staging areagit diffshows the difference between the working directory and the staging areagit commitpermanently stores file changes from the staging area in the repositorygit logshows a list of all previous commits

浙公网安备 33010602011771号