Skip to content

Commit

Permalink
git-commit-tree: add page (#5113)
Browse files Browse the repository at this point in the history
* git-commit-tree: add page

* Update pages/common/git-commit-tree.md

Co-authored-by: Starbeamrainbowlabs <[email protected]>

* Apply suggestions from code review

Still learning :D

Co-authored-by: Axel Navarro <[email protected]>

* Update pages/common/git-commit-tree.md

Co-authored-by: Starbeamrainbowlabs <[email protected]>
Co-authored-by: Axel Navarro <[email protected]>
  • Loading branch information
3 people authored Jan 8, 2021
1 parent 76db7af commit bae2dd0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pages/common/git-commit-tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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}}" --gpg-sign`

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

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

0 comments on commit bae2dd0

Please sign in to comment.