Git中经常使用术语

Key Termsshell

版本控制系统(VCS)或源代码管理器(SCM):一个VCS容许您:将文件恢复到之前的状态,将整个项目恢复到之前的状态,回顾随时间变化的变化,看谁最后修改了可能引发的事情。一个问题,谁提出了一个问题,何时,等等。编辑器

Version Control System (VCS) or Source Code Manager (SCM): A VCS allows you to:
revert files back to a previous state, revert the entire project back to a previous state,
review changes made over time, see who last modified something that might be causing
a problem, who introduced an issue and when, and more.ide

提交(快照):Git认为它的数据就像一组迷你文件系统的快照。每次提交或保存您的项目在Git中的状态时,基本上都须要图片的全部文件看起来像在那一刻,并存储一个参考快照。
Commit (snapshot): Git thinks of its data like a set of snapshots of a mini file system.
Every time you commit, or save the state of your project in Git, it basically takes a
picture of what all your files look like at that moment and stores a reference to that
snapshot.this

存储库(RePo):包含项目工做的目录,以及一些文件(默认在Mac OS X中隐藏),用于与Git通讯。仓库能够在计算机上本地存在,也能够做为另外一台计算机上的远程副本存在。
Repository (repo): A directory that contains your project work, as well as a few files
(hidden by default in Mac OS X) which are used to communicate with Git. Repositories
can exist either locally on your computer or as a remote copy on another computer.命令行

工做目录:您在计算机的文件系统中看到的文件。当你在代码编辑器上打开项目文件,您正在使用工做中的文件目录。这与已保存的文件造成对比(在提交中)!在存储库中。在使用Git时,工做目录也不一样于命令行。当前工做目录的概念,它是您的shell的目录
Working Directory: The files that you see in your computer's file system. When you open your project files up on a code editor, you're working with files in the Working Directory. This is in contrast to the files that have been saved (in commits!) in the repository. When working with Git, the Working Directory is also different from the command line's concept of the current working directory which is the directory that your shell is "looking at" right now.版本控制

签出:当存储库中的内容被复制到工做目录时。它能够从存储库中签出许多东西;文件、提交、分支等。分级区域或分级索引或索引:存储在GIT目录中的文件有关下一次提交的内容的信息。你能够想到舞台做为准备表,Git将采起下一个提交。分级索引的文件是准备添加到存储库中。code

Checkout: When content in the repository has been copied to the Working Directory. It is possible to checkout many things from a repository; a file, a commit, a branch, etc. Staging Area or Staging Index or Index: A file in the Git directory that stores information about what will go into your next commit. You can think of the staging area as a prep table where Git will take the next commit. Files on the Staging Index are poised to be added to the repository.orm

Sa*:SHA基本上是每一个提交的ID号。它是一个40字符串。由字符(0—9和a- f)组成,并根据文件的内容Git中的目录结构。“沙”是“沙哈”的速记。沙沙多是这样的:E2ADF8AE3E2E4ED40ADC75 CCF99D0A869AFEB6索引

SHA: A SHA is basically an ID number for each commit. It is a 40-character string composed of characters (0–9 and a–f) and calculated based on the contents of a file or directory structure in Git. "SHA" is shorthand for "SHA hash". A SHA might look like this:
e2adf8ae3e2e4ed40add75cc44cf9d0a869afeb6游戏

分支:当一条新的发展线偏离发展主线。这种替代的发展路线能够继续下去。改变主线。回到游戏中保存点的例子,你能够想到一个分支你在游戏中作一个保存点,而后决定尝试一个冒险的动做。游戏。若是冒险行动没有成功,那么你能够回到保存点。这个使分支很是强大的关键是你能够保存保存点。一个分支,而后切换到另外一个分支,并在那里保存保存点。

Branch: A branch is when a new line of development is created that diverges from the
main line of development. This alternative line of development can continue without
altering the main line.

Going back to the example of save point in a game, you can think of a branch as whereyou make a save point in your game and then decide to try out a risky move in thegame. If the risky move doesn't pan out, then you can just go back to the save point. Thekey thing that makes branches incredibly powerful is that you can make save points onone branch, and then switch to a different branch and make save points there, too.