- 浏览: 791654 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (651)
- Java (39)
- Java 初学者小问题 (66)
- 设计模式 (7)
- 项目管理 (3)
- 数据库 (1)
- 算法 (2)
- Java practices (6)
- Effective Java2读书笔记 (78)
- Linux (2)
- programming ruby 读书笔记 (5)
- Core Java Ninth Edition Volume I 读书笔记 (15)
- Pro Git 读书笔记 (12)
- Git (3)
- Maven in Action 读书笔记 (20)
- Web (12)
- 非技术类书籍 (11)
- 电影 (40)
- Web Cache (1)
- jquery (0)
- 历史 (4)
- Dive Into HTML5 读书笔记 (13)
- 三国演义小学毕业考 (79)
- 高效能人士的7个习惯 读书笔记 (12)
- Java Performance 读书笔记 (3)
- Protocol Buffer 学习笔记 (6)
- Mongo DB 学习笔记 (7)
- Morphia 学习笔记 (7)
- Algorithms -- Princeton 学习笔记 (13)
- String研究 (10)
- Hadoop: The Definitive Guide 读书笔记 (3)
- Java与模式读书笔记 (5)
- Date研究 (3)
- The Roman Empire 听课笔记 (4)
- Algorithms -- Standford 学习笔记 (16)
- Core Java Ninth Edition Volume II 读书笔记 (9)
- Thinking in Java 4th Edition 读书笔记 (21)
- Node : Up and Running 学习笔记 (5)
- Eloquent Javascript (8)
- Smashing Node.js 读书笔记 (1)
- Algorithms II -- Standford 学习笔记 (19)
- Algorithm II -- Princeton 学习笔记 (14)
- 网络安全 (2)
- Javascript (4)
- 正则表达式 (1)
- JAVA 7/8 (15)
- JVM (10)
- NodeJS (1)
- 鸟哥的linux私房菜读书笔记 (14)
- Web Service (1)
- The art of programming (9)
- Introduction to Algorithm 读书笔记 (4)
- Java 源码阅读 (0)
- Spring in Action 读书笔记 (2)
- Java Network Programming 读书笔记 (2)
最新评论
-
心存高远:
谢谢作者分享,刚好看到这里不太明白,现在茅塞顿开。不过runt ...
关于 Maven的传递依赖的理解 -
sxlkk:
851228082 写道甚至在某次技术会议现场遇到《Maven ...
关于 Maven的传递依赖的理解 -
851228082:
851228082 写道a----compile----b-- ...
第五章 坐标和依赖 -
851228082:
a----compile----b-----provided- ...
第五章 坐标和依赖 -
851228082:
甚至在某次技术会议现场遇到《Maven in action》的 ...
关于 Maven的传递依赖的理解
1. Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
2. Local Version Control Systems have a simple database that kept all the changes to files under revision control while Centralized Version Control Systems have a single server that contains all the versioned files, and a number of clients that check out files from that central place.
3. The most obvious downside of CVCS is the single point of failure that the centralized server represents.
4. In a Distributed Version Control System (such as Git, Mercurial, Bazaar, or Darcs), clients don't just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every checkout is really a full backup of all the data.
5. Most other systems think of the information they keep as a set of files and the changes made to each file over time:
Git thinks of its data more like a set of snapshots of a mini filesystem. 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. To be efficient, if files have not changed, Git doesn't store the file again—just a link to the previous identical file it has already stored.
6. Most operations in Git only need local files and resources to operate—generally, no information is needed from another computer on your network. Because you have the entire history of the project right there on your local disk, most operations seem almost instantaneous.
7. Everything in Git is check-summed before it is stored and is then referred to by that checksum. The mechanism that Git uses for this check-summing is called a SHA-1 hash. This is a 40-character string composed of hexadecimal characters (0–9 and a-f) and calculated based on the contents of a file or directory structure in Git. Git stores everything not by file name but in the Git database addressable by the hash value of its contents.
8. Git has three main states that your files can reside in: committed, modified, and staged. Committed means that the data is safely stored in your local database. Modified means that you have changed the file but have not committed it to your database yet. Staged means that you have marked a modified file in its current version to go into your next commit snapshot.
9. The Git directory is where Git stores the metadata and object database for your project. This is the most important part of Git, and it is what is copied when you clone a repository from another computer.
The working directory is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.
The staging area is a simple file, generally contained in your Git directory, that stores information about what will go into your next commit. It's sometimes referred to as the index, but it's becoming standard to refer to it as the staging area.
10. The basic Git workflow goes something like this:
1) You modify files in your working directory.
2) You stage the files, adding snapshots of them to your staging area.
3) You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
11. If a particular version of a file is in the Git directory, it's considered committed. If it's modified but has been added to the staging area, it is staged. And if it was changed since it was checked out but has not been staged, it is modified.
12. To install git from source:
1) Install the dependencies of Git : curl, zlib, openssl, expat, and libiconv.
$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
(on Fedora)
$ apt-get install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
(on Debian based system)
2) Grab the latest snapshot from: http://git-scm.com/download
3) Compile and install :
$ tar -zxf git-1.6.0.5.tar.gz
$ cd git-1.6.0.5
$ make prefix=/usr/local all
$ sudo make prefix=/usr/local install
4) Then you can get updates via Git itself:
$ git clone git://git.kernel.org/pub/scm/git/git.git
13. Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates. These variables can be stored in three different places:
1) /etc/gitconfig
file: Contains values for every user on the system and all their repositories. If you pass the option --system
to git config, it reads and writes from this file specifically. (for windows it’s Msys root which is where you install the msysgit.)
2) ~/.gitconfig
file: Specific to your user. You can make Git read and write to this file specifically by passing the --global
option.
3) config file in the git directory (.git/config
) of whatever repository you're currently using: Specific to that single repository.
4) config file in any folder you specified, you can specify the config file path by passing the –file or –f option.
Each level overrides values in the previous level.
14. The first thing you should do when you install Git is to set your username and e-mail address which is immutably baked into the commits you pass around:
$ git config --global user.name "Sean Zhou"
$ git config --global user.email xiangzhou@ebay.com
15. You can configure the default text editor that will be used when Git needs you to type in a message. By default, Git uses your system's default editor, which is generally Vi or Vim. If you want to use a different text editor, such as Emacs, you can do the following:
$ git config --global core.editor emacs
16. You can configure the default diff tool to use to resolve merge conflicts:
$ git config --global merge.tool vimdiff
Git accepts kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff as valid merge tools.
17. You can use the git config --list command to list all the configurations Git can find at that point. You can also check what Git thinks a specific key's value is by typing git config {key}
18. There are three ways to get the manual page (manpage) help for any of the Git commands:
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
发表评论
-
授权申明
2012-04-13 18:40 846近日我将我在iteye上发布的《Pro Git读书笔记》做成电 ... -
《Pro Git》读后感
2012-03-18 18:26 2325开始接触Git是在去年年初,公司开始从Clearcase 过度 ... -
Chapter 9. Git Internals
2012-03-18 17:27 23941. Git is fundamentally ... -
Chapter 8. Git and Other Systems
2012-03-17 21:44 13041. git svn allows y ... -
Chapter 7. Customizing Git
2012-03-17 16:10 18371. Git uses a series of ... -
Chapter 6. Git Tools
2012-03-13 19:52 13551. Git is smart ... -
Chapter 5. Distributed Git
2012-03-05 23:10 16441. You can easil ... -
Chapter 4. Git on the Server
2012-03-03 16:23 19501. The preferred method ... -
Chapter 3. Git Branching
2012-02-29 15:22 22351. Branching means you ... -
Chapter 2. Git Basics
2012-02-27 21:17 15741. You can get a ... -
《Pro Git》
2011-11-27 21:43 923A very good git tutorial: ...
相关推荐
Getting Started Chapter 2. ResearchKit Hello World Chapter 3. Building Surveys Chapter 4. ResearchKit Informed Consent Chapter 5. Active Tasks Chapter 6. Navigable and Custom Tasks Chapter 7. Backend...
Getting Started Chapter 2. Simple Data Types Chapter 3. Expressions And Output Chapter 4. Variables, Assignment And Scoping Rules Chapter 5. Logic, Comparisons, And Conditions Chapter 6. More Complex...
Getting Started With Matlab Machine Learning Chapter 2. Importing And Organizing Data In Matlab Chapter 3. From Data To Knowledge Discovery Chapter 4. Finding Relationships Between Variables - ...
Getting Started with Raspberry Pi Zero Chapter 2. Connecting Things to the Raspberry Pi Zero Chapter 3. Connecting Sensors - Measure the Real Things Chapter 4. Control-Connected Devices Chapter 5. ...
Getting Started with Python Machine Learning Chapter 2. Classifying with Real-world Examples Chapter 3. Clustering – Finding Related Posts Chapter 4. Topic Modeling Chapter 5. Classification – ...
Getting Started Chapter 2. Using SVG in Web Pages Chapter 3. Coordinates Chapter 4. Basic Shapes Chapter 5. Document Structure Chapter 6. Transforming the Coordinate System Chapter 7. Paths Chapter 8...
Chapter 1. Getting Started with WebRTC Chapter 2. Getting the User's Media Chapter 3. Creating a Basic WebRTC Application Chapter 4. Creating a Signaling Server Chapter 5. Connecting Clients Together ...
Getting Started with Xcode and Swift Chapter 2. Standard Library and Collections Chapter 3. Using Structs and Generics Chapter 4. Design Patterns with Swift Chapter 5. Multitasking in Your App ...
Getting Started Chapter 2. User Accounts Chapter 3. Creating an Account Chapter 4. Parental Controls Chapter 5. Editing Accounts Chapter 6. Setting Up the Login Process Chapter 7. Logging In and Out ...
Chapter 1. Getting Started Hello Qt Making Connections Laying Out Widgets Using the Reference Documentation Chapter 2. Creating Dialogs Subclassing QDialog Signals and Slots in Depth ...
Getting Started With The Scalable Language Chapter 2. Working With Data: Literals, Values, Variables, and Types Chapter 3. Expressions and Conditionals Chapter 4. Functions Chapter 5. First Class ...
Getting started Chapter 2. Performing operations Chapter 3. Making statements Chapter 4. Directing values Chapter 5. Manipulating data Chapter 6. Creating classes Chapter 7. Importing functions ...
Getting Started Chapter 2. Implementing Your First Custom View Chapter 3. Handling Events Chapter 4. Advanced 2D Rendering Chapter 5. Introducing 3D Custom Views Chapter 6. Animations Chapter 7. ...