1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-08 01:26:00 +02:00
tldr/pages/common/git-commit-tree.md
Managor 0e8893e1ba
git*: refresh pages (#16372)
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2025-05-05 09:12:13 +03:00

623 B

git commit-tree

Low level utility to create commit objects. See also: git commit. More information: https://git-scm.com/docs/git-commit-tree.

  • Create a commit object with the specified message:

git commit-tree {{tree}} -m "{{message}}"

  • Create a commit object reading the message from a file (use - for stdin):

git commit-tree {{tree}} -F {{path/to/file}}

  • Create a GPG-signed commit object:

git commit-tree {{tree}} -m "{{message}}" {{[-S|--gpg-sign]}}

  • Create a commit object with the specified parent commit object:

git commit-tree {{tree}} -m "{{message}}" -p {{parent_commit_sha}}