1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.ja/common/git-commit.md
Managor fe4c26ba2e
pages*/common/*: add option placeholders to translations part 2 (#15901)
Co-authored-by: Darío Hereñú <magallania@gmail.com>
2025-03-14 12:48:28 +05:30

28 lines
1.1 KiB
Markdown

# git commit
> リポジトリにファイルをコミットします。
> もっと詳しく: <https://git-scm.com/docs/git-commit>。
- メッセージと共に、ステージ済のファイルをリポジトリにコミットする:
`git commit {{[-m|--message]}} "{{メッセージ}}"`
- ファイルから読みとったメッセージと共に、ステージ済のファイルをコミットする:
`git commit {{[-F|--file]}} {{コミットメッセージが書かれたファイルへのパス}}`
- 変更されたファイルを全て自動的にステージし、メッセージと共にコミットする:
`git commit {{[-a|--all]}} {{[-m|--message]}} "{{メッセージ}}"`
- 今のステージ済の変更を最後のコミットに付け足し、コミットハッシュを変更する:
`git commit --amend`
- 特定のファイル(ステージ済)だけをコミットする:
`git commit {{ファイルパス1 ファイルパス2 ...}}`
- ステージ済のファイルが無くても、コミットを作る:
`git commit {{[-m|--message]}} "{{メッセージ}}" --allow-empty`