-
Notifications
You must be signed in to change notification settings - Fork 0
/
17 final thoughts
48 lines (32 loc) · 1.34 KB
/
17 final thoughts
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
Here are some main points that I think are worth remembering:
1. Everything in git is represented with objects
2. Objects are stored in a file whose name comes from
the sha1 hash that is calculated from the contents
of the object
3. Git keeps track of different states by simply having
pointers to those states! i.e. Branches point to
commits, tags may point to commits etc.
Now with this knowledge here are some fun questions to think about:
1. Given that each deploy to prod is tagged, how would I see a diff
of what has changed between the deploys? (On the lowest level what
information will git require?)
2. Is it inefficient to store compressed copies of each state a file
has been in? What advantages does this model give you? How could
you try to save disk space?
3. What is the difference between ~ and ^ i.e. what are
the differences between:
- HEAD~1
- HEAD~2
- HEAD^1
- HEAD^2
4. `git fetch` is a non-destructive operation. What does it do?
And finally here are some questions you might not
be able to answer yet but would be super duper cool
to know!
1. What is git's merge algorithm?
2. What is git's rebase algorithm?
3. What is git's packing heuristic?
4. How does the stash work?
Pretty much everything in this presentation
(plus a lot more stuff) can be found here:
https://git-scm.com/book/en/v2