From aef095b9ca8c6fdc71be1b1d05dd28ceb672ab37 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 20 Aug 2015 01:43:46 +0300 Subject: [PATCH] git commit [--only] -- $FILE --- pep-git.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pep-git.txt b/pep-git.txt index aa86ef8..43e8ddd 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -650,7 +650,8 @@ committing means you need to do that for every change, not only to add new (untracked) files. To simplify committing in case you just want to commit everything without reviewing run ``git commit --all`` (or just ``-a``) - the command adds every changed tracked file to the index and -then commit. +then commit. To commit a file or files regardless of patches collected +in the index run ``git commit [--only] -- $FILE...``. To add hunks of patches to the index use ``git add --patch`` (or just ``-p``). To remove collected files from the index use ``git reset HEAD -- 2.39.2