Versioning is a system that records the changes in one or several file contents so that future access to a specific version of the revision is an indispensable management tool in the software development process.
A common version control system can be divided into three main categories: local version control, centralized versioning, and distributed versioning.
Local version control: distinguishes between different versions by copying the project directory, or renaming the name. Pros: Simple, bad: working directory is easy to confuse, file loss cannot undo recovery.
Centralized versioning: One server is used to manage the repository and to save revisions to all files. Get the latest files from the server through the client and submit the updated version. Common software Systems: CVS, Subversion, Perforce. Benefits: Work together; Cons: Single point of failure.
Distributed version control: Each client is a full repository. Any server that works together fails, and can be recovered from any local repository. Common software systems: git, mercurial, etc.
Git is currently the most popular distributed version control system. There are three types of files in Git: committed (committed), modified (modified), staged (staged).
Committed: The file has been saved to the local database.
Modified: A file has been modified, but has not yet been submitted.
Staged: The modified file is placed in the list to be saved on the next commit.
In git three state files corresponding to the file flow work area: Git working directory, staging area, local warehouse, see the reference:
This is a simple introduction to the important concepts in git, and we'll start by installing git after we have a basic understanding. This article takes window system as an example, the installation step is very simple, again do not do too much introduction.
git:http://www.git-scm.com/download/
After the GIT installation is complete, we start to create the repository. The repository can also become a repository, the plain is a directory, but this directory of files will be managed by git, each file is added, deleted, change will be git tracking.
1. Create an empty directory: Mygit
2. Initialize repository: Git init
Right-click in the Mygit and choose Git Bash from the pop-up menu. In the Git Bash Command line window, type: GIT init command to initialize the repository.
After the command execution is complete, the. Git directory appears in the directory, which is the most important directory that Git uses to manage the tracking repository.
3. Add File: Git Add file name
First create a new file Readme.txt, enter the command in git bash git add readme.txt
by command: Git status, you can view the status, the file Readme.txt has been put into staging area, but has not yet been committed to the local repository.
Through the command: Git commit, you can submit the file to the local library, note that after-M is stored in the comments of this submission.
With the above steps, you can complete the creation of a repository and add new files to the library. Actually in the last step of the submission, we need to configure git, please refer to the next article content.
If you have any inquiries or technical exchanges, please join the official QQ Group: (452379712)
Jerry Education
Source:http://www.cnblogs.com/jerehedu/
This article is the copyright of Yantai Jerry Education Technology Co., Ltd. and the blog Park is shared, welcome reprint, but without the consent of the author must retain this paragraph statement, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.
Version Control-git