]> gitweb.factorcode.org Git - factor.git/blob - extra/git/notes.txt
arm.64.factor: extra semicolon removed
[factor.git] / extra / git / notes.txt
1 CONSTANT: OBJ_COMMIT 1
2 CONSTANT: OBJ_TREE 2
3 CONSTANT: OBJ_BLOB 3
4 CONSTANT: OBJ_TAG 4
5 CONSTANT: OBJ_OFS_DELTA 6
6 CONSTANT: OBJ_REF_DELTA 7
7
8 "/Users/erg/factor" set-current-directory
9 "3dff14e2f3d0c8db662a8c6aeb5dbd427f4258eb" git-read-pack
10
11 "/Users/erg/factor" set-current-directory
12 git-log
13
14 "/Users/erg/factor" set-current-directory
15 "401597a387add5b52111d1dd954d6250ee2b2688" git-object-from-pack
16
17 git verify-pack -v .git/objects/pack/pack-816d07912ac9f9b463f89b7e663298e3c8fedda5.pack | grep a6e0867b
18 a6e0867b2222f3b0976e9aac6539fe8f12a552e2 commit 51 63 12938 1 8000d6670e1abdbaeebc4452c6cccbec68069ca1
19 ! problem: a6e0867b2222f3b0976e9aac6539fe8f12a552e2
20
21 ! investigate:
22 http://stackoverflow.com/questions/9478023/is-the-git-binary-diff-algorithm-delta-storage-standardized/9478566#9478566
23
24 http://stackoverflow.com/questions/801577/how-to-recover-git-objects-damaged-by-hard-disk-failure
25 git ls-tree
26
27 ! eh
28 http://schacon.github.io/git/technical/pack-format.txt
29 https://schacon.github.io/gitbook/7_the_packfile.html
30
31 ! most useful doc:
32 http://git.rsbx.net/Documents/Git_Data_Formats.txt
33
34 ! git show:
35 git show -s --pretty=raw 2ca509a8fe681d58f80d402ea9da2be20b9ab0a0
36
37 ! git add
38 git add -p   # parts of files
39
40 ! git reset
41 git merge --abort  is alias for  git reset --merge
42
43 ! Merge strategies:
44 octopus: git merge fixes enhancements # two branches merging
45 git merge --no-commit maint # merge maint into current branch, but do not make a commit yet
46 http://git-scm.com/docs/git-merge
47 http://stackoverflow.com/questions/161813/fix-merge-conflicts-in-git?rq=1
48
49 # common base:
50 git show :1:_widget.html.erb
51 # 'ours'
52 git show :2:_widget.html.erb
53 # 'theirs'
54 git show :3:_widget.html.erb
55
56 git show :3:_widget.html.erb >_widget.html.erb
57 git add _widget.html.erb
58 aka
59 git checkout --theirs _widget.html.erb
60
61
62
63 Guys, "ours" and "theirs" is relative to whether or not you are merging or rebasing. If you're merging, then "ours" means the branch you're merging into, and "theirs" is the branch you're merging in. When you're rebasing, then "ours" means the commits you're rebasing onto, while "theirs" refers to the commits that you want to rebase. –  Cupcake May 26 '14 at 4:27
64
65
66 ! random
67 https://github.com/libgit2/libgit2/blob/091165c53b2bcd5d41fb71d43ed5a23a3d96bf5d/docs/diff-internals.md
68 https://github.com/schacon/git-server/blob/master/git-server.rb
69
70 https://git-scm.com/blog
71
72 https://github.com/gitchain/gitchain/blob/2baefefd1795b358c98335f120738b60966fa09d/git/delta.go
73 https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#git-concepts
74
75 ! graphs in terminal:
76 http://stackoverflow.com/questions/1064361/unable-to-show-a-git-tree-in-terminal
77
78 git-daemon:
79  git daemon --reuseaddr --verbose  --base-path=. --export-all
80 $> export GIT_TRACE_PACKET=1
81    git ls-remote git://127.0.0.1/git-bottom-up
82
83
84
85 raw git:
86 https://schacon.github.io/gitbook/7_raw_git.html
87
88 # write object
89 git hash-object -w myfile.txt
90
91 -----------------------------------
92 Now lets say you want to create a tree from your new objects. The git mktree command makes it pretty simple to generate new tree objects from git ls-tree formatted output. For example, if you write the following to a file named '/tmp/tree.txt' :
93
94 100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3    file1
95 100644 blob 3bb0e8592a41ae3185ee32266c860714980dbed7    file2
96
97 $ cat /tmp/tree.txt | git mk-tree
98 f66a66ab6a7bfe86d52a66516ace212efa00fe1f
99
100 100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3    file1-copy
101 040000 tree f66a66ab6a7bfe86d52a66516ace212efa00fe1f    our_files
102
103 $ cat /tmp/newtree.txt | git mk-tree
104 5bac6559179bd543a024d6d187692343e2d8ae83
105
106
107 .
108 |-- file1-copy
109 `-- our_files
110     |-- file1
111     `-- file2
112
113 1 directory, 3 files
114
115 ---------------------------------------------
116
117
118
119 $ export GIT_INDEX_FILE=/tmp/index
120 $ git read-tree --prefix=copy1/  5bac6559
121 $ git read-tree --prefix=copy2/  5bac6559
122 $ git write-tree 
123 bb2fa6de7625322322382215d9ea78cfe76508c1
124
125 $>git ls-tree bb2fa
126 040000 tree 5bac6559179bd543a024d6d187692343e2d8ae83    copy1
127 040000 tree 5bac6559179bd543a024d6d187692343e2d8ae83    copy2
128
129 -------------------------------
130
131
132 GIT_AUTHOR_NAME
133 GIT_AUTHOR_EMAIL
134 GIT_AUTHOR_DATE
135 GIT_COMMITTER_NAME
136 GIT_COMMITTER_EMAIL
137 GIT_COMMITTER_DATE
138 $ git commit-tree bb2fa < /tmp/message
139 a5f85ba5875917319471dfd98dfc636c1dc65650
140
141 $ git update-ref refs/heads/master a5f85ba5875917319471dfd98dfc636c1dc65650
142
143
144 https://github.com/magit/magit
145
146 https://www.kernel.org/pub/software/scm/git/docs/user-manual.html