From: Oleg Broytman Date: Wed, 19 Aug 2015 22:43:46 +0000 (+0300) Subject: git commit [--only] -- $FILE X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=aef095b9ca8c6fdc71be1b1d05dd28ceb672ab37;p=git-wiki.git git commit [--only] -- $FILE --- 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