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
K.B.Dharun Krishna 5c26174aa9
pages/*: update links and more info link script (#11390)
* pages/*: update links and more info link script

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup: reformat code

* ax-webapp: fix link

* curl: fix false positive

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2023-11-06 23:14:12 +05:30

32 lines
1.2 KiB
Markdown

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