Search

git commit

Requirements
To follow this setup, it is required to have following …
No Requirements
Commit [git commit]
Create a new commit containing the current contents of the index and the given log message describing the changes. The new commit is a direct child of HEAD, usually the tip of the current branch, and the branch is updated to point to it.
Synopsis [git commit --<commands>]
git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<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]] [(--trailer <token>[(=|:)<value>])…] [-S[<keyid>]] [--] [<pathspec>]
YAML
복사
Commonly Used Commands
Default commit
git commit .
git commit <file name>
Add & Commit at the same time
git commit -am "<Commit Message>"
View changes on commit message
git commit -v
Edit latest commit
Default edit
git commit -amend -m "<New commit message>"
Add before edit
1.
Fix code
2.
git commit -a --amend -m "<Commit message>"

Reference