forked from gotgit/gotgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
references.txt
267 lines (150 loc) · 7.81 KB
/
references.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
git 调查
TODO
========
* 前言重新组织,尤其是适用对象。重新组织后给编辑看。
+ 每个电脑的使用者,都有版本控制的需要。Git 是版本控制的 Dream tools。
dropbox, 网盘, github
+-------+ +-------+
| | | |
| pc1 | <-----> (VirtualHost) <-------> | pc2 |
| | (usb drive) | |
+-------+ (cloud storage) +-------+
+-------+ +-------+
| | | |
| pc1 | <-----> (VirtualHost with git) <-------> | pc2 |
| | (usb drive with git) | |
+-------+ (GitHub) +-------+
* Git 工具介绍章节,以 Git 调查的结果做引子。
https://www.survs.com/results/33Q0OZZE/MV653KSPI2
* 揭开面纱系列。放在每个 Git 基础章节的最后。
+ 揭开面纱2:
- stage 以及 stage 的灵活变更集
- DAG: Directed Acylic Graph.
- Git databae is stupid simple: Git 对象: blob, tree, commit, tag
- Git 提交的奥秘:
- 引用的奥秘:
* Git 独奏模式(4): Git 效率
+ 操作
- 大文件,多次复制和重命名
- 文件内容跟踪
* Git 独奏模式(5): 后悔药
+ 操作
- 游标
- git reset
- 对最新提交的重置,最简单的操作:git commit --amend
- git rebase
* Git 协作模式
+ commit -s 以便加上 Signoff-by
版本库整理: write-tree, => commit , gc
* Git 的其他实现
Git relies and is built around [repository] formats and [network] protocols. Instead of language bindings there are (partial or complete) reimplementations of Git in other languages (some of those are partially reimplementations, and partially wrappers around git commands): JGit (Java, used by EGit, Eclipse Git Plugin), Grit (Ruby), Dulwich (Python), git# (C#).
You can't tag non-commit object in Mercurial like you can in Git, but that is not very important, I think (some git repositories use tagged blob to distribute public PGP key to use to verify signed tags).
* lightweight tag 和 annotated tag
Git treats lightweight tags (pointing directly to commits) and annotated tags (pointing to tag objects, which contain tag message which optionally includes PGP signature, which in turn point to commit) slightly differently, for example by default it considers only annotated tags when describing commits using "git describe".
Git supports two kinds of protocols used to access remote repository:
* "smart" protocols, which include access via SSH and via custom git:// protocol (by git-daemon), require having git installed on server. The exchange in those protocols consist of client and server negotiating about what objects they have in common, and then generating and sending a packfile. Modern Git includes support for "smart" HTTP protocol.
* "dumb" protocols, which include HTTP and FTP (only for fetching), and HTTPS (for pushing via WebDAV), do not require git installed on server, but they do require that repository contains extra information generated by git update-server-info (usually run from a hook). The exchange consist of client walking the commit chain and downloading loose objects and packfiles as needed. The downside is that it downloads more than strictly required (e.g. in corner case when there is only single packfile it would get downloaded whole even when fetching only a few revisions), and that it can require many connections to finish.
备忘
=====
出版社
--------
1. 人民邮电。图灵:
+++++++++++++++++
http://www.ptpress.com.cn/
http://www.turingbook.com/
“机械工业出版社 —— 曾经心目中的NO.1,现在势头有些后劲不足……”
原因是其主要核心力量到图灵来了 :)。
2. 机械工业出版社华章: http://www.cmpbook.com/
++++++++++++++++++++++++++++++++++++++++++++++
机械工业出版社是全国优秀出版社。2008年被世界品牌实验室评为中国500最具价值品牌中仅有的四家出版社之一。
华章分社
010-88379604(计算机)
[email protected](计算机)
3. 电子工业出版社旗下的博文视点
++++++++++++++++++++++++++++++++
4. 清华: http://www.tupwk.com.cn/xsmin.asp
++++++++++++++++++++++++++++++++++++++++++++
git rev-parse
++++++++++++++++
最全能的语法
--is-inside-git-dir
--is-inside-work-tree
--is-bare-repository
--show-cdup
--parseopt
--revs-only:
--no-revs:
--no-flags:
^{} 是什么语法?
71f197d2be9daf326bf6b7639871c5e754fb386b refs/tags/v1.0
56d0b573eae2dff09a5e225138055ea07d5de0d8 refs/tags/v1.0^{}
blob
---------------
refs
------------------------
引用
staging area : 暂存区
------------------------
字典的解释
<--- 朗道英汉字典5.0 --->
staging area
【医】 遣送区
<--- Dict.cn --->
staging area
部队从一个战场转往另一个战场的集结地
git config
-------------------
$ git config --global core.editor emacs
$ git config --global merge.tool vimdiff
Git 可以理解 kdiff3,tkdiff,meld,xxdiff,emerge,vimdiff,gvimdiff,ecmerge,和 opendiff 等合并工具的输出信息。
repository
--------------
仓库
remote repos: 远程仓库
review
-----------
代码审查
Git 协议
--------
SSH 协议的语法有:
SCP 风格:: URI_SCP = re.compile(r'^([^@:]*@?[^:/]{1,}):')
: 不能设定端口,除非试用别名
schema 风格 :: URI_ALL = re.compile(r'^([a-z][a-z+]*)://([^@/]*@?[^/]*)/')
可以设定端口 ssh://user@host:port/
ssh://, git+ssh:// ssh+git://
what is valid ref name?
-------------------------
git.check_ref_format "heads/xxxxxxxx"
git describe 命令
------------------
显示当前最近的 tag,如果在最近的 tag 基础上有新的提交,则用最近的tag 加上 "-g<commit-id>"
版本
-----
^+rev : 取反?
::
Thus, the following command:
$ git rev-list foo bar ^baz
means "list all the commits which are reachable from foo or bar, but not from baz".
A special notation "<commit1>..<commit2>" can be used as a short-hand for "^<commit1> <commit2>". For example,
either of the following may be used interchangeably:
$ git rev-list origin..HEAD
$ git rev-list HEAD ^origin
Another special notation is "<commit1>...<commit2>" which is useful for merges. The resulting set of commits is
the symmetric difference between the two operands. The following two commands are equivalent:
$ git rev-list A B --not $(git merge-base --all A B)
$ git rev-list A...B
Git 钩子
--------
* repo/hooks/commit-msg
* repo/hooks/pre-auto-gc
词语翻译
========
ref
参考资料
========
http://www.pcworld.idg.com.au/article/129776/after_controversy_torvalds_begins_work_git_/
* Though BitMover allowed Linux developers to use a free version of its software for kernel development, the company was unhappy with efforts by developer Andrew Tridgell to develop an open source version of the BitKeeper client.
* Linus Torvalds has quipped about the name "git", which is British English slang for a stupid or unpleasant person:[4] "I'm an egotistical [sic] bastard, and I name all my projects after myself. First Linux, now git."[5][6]
http://lwn.net/Articles/131657/
* Git is not a source code management (SCM) system. It is, instead, a set of low-level utilities (Linus compares it to a special-purpose filesystem) which can be used to construct an SCM system. Much of the higher-level work is yet to be done, so the interface that most developers will work with remains unclear.
* At the lower levels, Git implements two data structures: an object database, and a directory cache. The object database can contain three types of objects: