git commit
インデックス(ステージングエリア)に登録された変更点を、ローカルリポジトリに反映するコマンド。
用例
- 変更があるファイルを全てコミット
git commit .
- 全てのファイルをメッセージを指定してコミット
git commit -m "メッセージ"
- ファイル「hoge.txt」のみメッセージを指定してコミット
git commit hoge.txt -m "メッセージ"
- 直前のコミットを上書き
git commit --amend
書式
git commit [options] [--] <pathspec>...
公式によると以下の通り。
git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>] [--[no-]status] [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]] [-S[<keyid>]] [--] [<pathspec>…]
options
/x | xxx |
etc.
説明
XXXX
関連
- xxx
参考リンク
- git commit - Gitコマンド虎の巻
- Git - git-commit Documentation
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
その他メモ
なにかあれば。