User Tools

Site Tools


git_fsck

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_fsck [2019/03/03 21:56]
rpjday [Examples]
git_fsck [2019/03/12 15:21]
rpjday [Overview]
Line 1: Line 1:
 ===== Overview ===== ===== Overview =====
  
-Using ''​git fsck''​ to display dangling and unreachable objects.+Using ''​git fsck''​ to display dangling and unreachable objects ​(should cover reflog first). 
 + 
 +Check: 
 + 
 +  * Does ''​%%--%%lost-found''​ save blobs? Don't think so.
  
 ===== SYNOPSIS ===== ===== SYNOPSIS =====
  
 <​code>​ <​code>​
-git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs] +git fsck 
-         ​[--[no-]full] [--strict] [--verbose] [--lost-found] +  ​[--tags] [--root] [--unreachable] [--cache] [--no-reflogs] 
-         ​[--[no-]dangling] [--[no-]progress] [--connectivity-only] +  [--[no-]full] [--strict] [--verbose] [--lost-found] 
-         ​[--[no-]name-objects] [<​object>​*]+  [--[no-]dangling] [--[no-]progress] [--connectivity-only] 
 +  [--[no-]name-objects] [<​object>​*]
 </​code>​ </​code>​
  
 ===== Dangling versus unreachable ===== ===== Dangling versus unreachable =====
 +
 +A dangling object is an unreachable object which is not reachable even from //other// unreachable objects; a dangling object has no references to it from //any// reference or object in the repository.
  
 <​code>​ <​code>​
-                A<​-----B<​-----C+                A<​-----B<​-----C ​  [no reference to this]
                /                /
               /               /
Line 21: Line 28:
 </​code>​ </​code>​
  
-If nothing points at C, then all of A, B and C are unreachable,​ but only C is dangling.+  * unreachable: ​A, Band C 
 +  * dangling: C only
  
 ===== OPTIONS ===== ===== OPTIONS =====
Line 45: Line 53:
 </​code>​ </​code>​
  
-''​%%--%%unreachable''​ overrides ''​%%--%%no-dangling''​.+Note that ''​%%--%%unreachable''​ overrides ''​%%--%%no-dangling''​.
  
 ===== Examples ===== ===== Examples =====
Line 158: Line 166:
 dangling commit 99fd08769f3e7c134c4fc97c76edd5e9b4c9e562 dangling commit 99fd08769f3e7c134c4fc97c76edd5e9b4c9e562
 $ $
 +</​code>​
 +
 +===== Config options =====
 +
 +<​code>​
 +fsck.skipList
 +    The path to a list of object names (i.e. one unabbreviated
 +    SHA-1 per line) that are known to be broken in a non-fatal
 +    way and should be ignored. On versions of Git 2.20 and
 +    later comments (#), empty lines, and any leading and
 +    trailing whitespace is ignored. Everything but a SHA-1 per
 +    line will error out on older versions.
 </​code>​ </​code>​
git_fsck.txt · Last modified: 2019/03/12 15:21 by rpjday