projects:progit:inspection
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:progit:inspection [2016/02/15 22:45] – [References] mkucia | projects:progit:inspection [2016/02/21 21:28] (current) – [References] mkucia | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Inspecting Git repository ====== | ====== Inspecting Git repository ====== | ||
- | ===== Te Three Main States ===== | + | ===== The Three Main States ===== |
^ State ^ Location ^ Description ^ Method of inspection ^ | ^ State ^ Location ^ Description ^ Method of inspection ^ | ||
- | | Commited | .git directory | Stored in DB | '' | + | | Commited | .git directory | Stored in DB | '' |
| Modified | Working directory | Changed | '' | | Modified | Working directory | Changed | '' | ||
| Staged | Staging area (.git/ | | Staged | Staging area (.git/ | ||
- | < | + | Staging area has many names: |
* Index | * Index | ||
* Cache | * Cache | ||
Line 15: | Line 15: | ||
* Staging area | * Staging area | ||
* Staged files | * Staged files | ||
- | </ | ||
- | ===== Specifying revision | + | ===== Revision |
There are many ways to distinguish a specific commit from Git repository. | There are many ways to distinguish a specific commit from Git repository. | ||
- | - **SHA** (hash) - The [[wp> | + | - '' |
- (refnames, refs) | - (refnames, refs) | ||
- | - **Branch reference** (heads) - Branches in Git are nothing more than pointers to the commit. Branch reference is a SHA value of the most recent commit and it is updated with each new commit added. (show rev-parse show-ref) | + | - '' |
- | - **Tag reference** - Similar to Branch reference but does not change with new commits. (git describe) | + | - '' |
- | - **HEAD** (@) - Note the capital letters. Points to the current commit. (git describe) | + | - '' |
- | - **Other** like FETCH_HEAD, MERGE_HEAD, CHERRY_PICK_HEAD, | + | - '' |
- | - **< | + | - '' |
- | - **< | + | - '' |
- | - **< | + | - '' |
- | - **< | + | - '' |
- | - **< | + | - '' |
- | - **< | + | - '' |
- | - **<rev>^{type}** - difference | + | - more ... |
+ | ==== Walking the tree with '' | ||
+ | <code> | ||
+ | A = = A^0 | ||
+ | B = A^ = A^1 = A~1 | ||
+ | C = A^2 = A^2 | ||
+ | D = A^^ = A^1^1 = A~2 | ||
+ | E = B^2 = A^^2 | ||
+ | F = B^3 = A^^3 | ||
+ | G = A^^^ = A^1^1^1 = A~3 | ||
+ | H = D^2 = B^^2 = A^^^2 = A~2^2 | ||
+ | I = F^ = B^3^ = A^^3^ | ||
+ | J = F^2 = B^3^2 = A^^3^2 | ||
+ | </ | ||
+ | ==== Tree ==== | ||
+ | (idea taken from [[https:// | ||
+ | |||
+ | < | ||
+ | <?xml version=" |