git-write-tree.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. git-write-tree(1)
  2. =================
  3. NAME
  4. ----
  5. git-write-tree - Create a tree object from the current index
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'git write-tree' [--missing-ok] [--prefix=<prefix>/]
  10. DESCRIPTION
  11. -----------
  12. Creates a tree object using the current index. The name of the new
  13. tree object is printed to standard output.
  14. The index must be in a fully merged state.
  15. Conceptually, 'git write-tree' sync()s the current index contents
  16. into a set of tree files.
  17. In order to have that match what is actually in your directory right
  18. now, you need to have done a 'git update-index' phase before you did the
  19. 'git write-tree'.
  20. OPTIONS
  21. -------
  22. --missing-ok::
  23. Normally 'git write-tree' ensures that the objects referenced by the
  24. directory exist in the object database. This option disables this
  25. check.
  26. --prefix=<prefix>/::
  27. Writes a tree object that represents a subdirectory
  28. `<prefix>`. This can be used to write the tree object
  29. for a subproject that is in the named subdirectory.
  30. GIT
  31. ---
  32. Part of the linkgit:git[1] suite