Glossary of common terms git and (ii)



Git understand the terminology in order to more easily read and communicate, below lists common terms and phrases of git.

A, git term

1), storage (Repository)
to save the modification history of all files.

2), work area (Working Directory) 
working directory on the local computer file folder.

3), the staging area (Staging area)
temporary area is a staging file workspace changes.

4), index (Index)
index is another term of the temporary area, i.e. temporary alias region.

5), check (Checkin)
Copy the new version back to the warehouse

6), checked out (Checkout)
Copy the files from the latest revision of the warehouse to the work area

7), submission (Commit)
to submit documents to the staging area warehouse

8), conflict (conflict)
more than for the same part of the same file has been modified, leading to conflict.

9), combined (the Merge)
specified branch into the current branch

10), the branch (Branch)
copies separated from the current branch.

11), the head (the HEAD)
pointing to the branch chosen.

12), revision (Revision)
represents a version of the status code. Git to identify different versions of the ID indicated by the SHA1 hash algorithm.

13), marks (Tags)
mark a version of a branch, easy retrieval and viewing.

14), push (the Push)
push to the remote repository current branch

15), pull (the Pull)
Pull files from a remote repository, and merge into the current branch.
 

Two, git file status nouns

git file has four states, status of the file transfer between these four states.

1. Untracked: untracked. This file is only in the work area, staging area and the repository without it, no version control. Create or add a file that is not generating a trace file. By git add it to the staging area, which has become a trace file.

2.Unmodified: unmodified. Documents have been put in storage, unmodified, that is the repository of files and the contents of the snapshot workspace exactly the same. This type of files in two places, if it is modified, becomes Modified if out of the repository, it becomes Untracked file.

3. Modified: Modified.
Already versioned files are modified in the workspace, has not joined the staging area. This file also has two places, accessible by git add scratch staged state. Use git checkout - <filename> command to discard changes and return to the state unmodify, git checkout - <filename> command to cover the working area is used as the file staging area

4. Staged: is temporary.
File has entered the temporary storage area.

Transfer status is as follows:




Example:
1. Create a new file in the workspace a.txt. At this time, the file status is untracked
2. execute git add a.txt. The file is state Staged.
3. Modify a.txt file and save it, the file status is Modified.
4. Perform git add a.txt. At this point the file status but also for Staged.
5. Perform git commit -m 'Submit a file', the file state to Unmodified.
6. Do git rm --cached a.txt. At this point a.txt workspace becomes Untracked state.

 

Reprinted from: Excellent known code  https://www.javaidea.cn/topic/1233.html

Guess you like

Origin www.cnblogs.com/beenupper/p/12526794.html