Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "JGit/FAQ"
< JGit
(New page: TODO) |
|||
Line 1: | Line 1: | ||
− | + | === How to inspect the git index === | |
+ | To see what's stored in the git index | ||
+ | * from git cli run [http://www.kernel.org/pub/software/scm/git/docs/git-ls-files.html git ls-files -v -s] | ||
+ | <pre>$ git ls-files -v -s] | ||
+ | <file type> <mode> <object> <stage> <file>) | ||
+ | H 100644 dc701694e405702940dc97caada20a3e5d64bbba 0 .eclipse_iplog | ||
+ | H 100644 f57840b7eec86b91b135afc40f20d950c5d86988 0 .gitattributes | ||
+ | H 100644 1b85c64665f461a1ac948345c5f8034b751eda93 0 LICENSE | ||
+ | </pre> | ||
+ | * The debug-show-dircache command in jgit-cli.jar (get it from the jgit maven build) provides some more details | ||
+ | |||
+ | <pre>$ java -jar jgit-cli.jar --git-dir /c/git/jgit/.git debug-show-dircache | ||
+ | <mode><length> <timestamp> <object> <file> | ||
+ | 100644 871 20100706,131532.000 dc701694e405702940dc97caada20a3e5d64bbba .eclipse_iplog | ||
+ | 100644 17 20100219,165448.000 f57840b7eec86b91b135afc40f20d950c5d86988 .gitattributes | ||
+ | 100644 1716 20100706,131532.000 1b85c64665f461a1ac948345c5f8034b751eda93 LICENSE | ||
+ | ... | ||
+ | </pre> |
Revision as of 07:00, 8 July 2010
How to inspect the git index
To see what's stored in the git index
- from git cli run git ls-files -v -s
$ git ls-files -v -s] <file type> <mode> <object> <stage> <file>) H 100644 dc701694e405702940dc97caada20a3e5d64bbba 0 .eclipse_iplog H 100644 f57840b7eec86b91b135afc40f20d950c5d86988 0 .gitattributes H 100644 1b85c64665f461a1ac948345c5f8034b751eda93 0 LICENSE
- The debug-show-dircache command in jgit-cli.jar (get it from the jgit maven build) provides some more details
$ java -jar jgit-cli.jar --git-dir /c/git/jgit/.git debug-show-dircache <mode><length> <timestamp> <object> <file> 100644 871 20100706,131532.000 dc701694e405702940dc97caada20a3e5d64bbba .eclipse_iplog 100644 17 20100219,165448.000 f57840b7eec86b91b135afc40f20d950c5d86988 .gitattributes 100644 1716 20100706,131532.000 1b85c64665f461a1ac948345c5f8034b751eda93 LICENSE ...