public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Stefan Näwe" <stefan.naewe@atlas-elektronik•com>
Cc: "git\@vger.kernel.org" <git@vger•kernel.org>
Subject: Re: git commit --only -- $path when $path already has staged content
Date: Fri, 07 Nov 2014 08:57:56 -0800	[thread overview]
Message-ID: <xmqqioirgd7v.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqmw83gd94.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Fri, 07 Nov 2014 08:57:11 -0800")

Junio C Hamano <gitster@pobox•com> writes:

> Stefan Näwe <stefan.naewe@atlas-elektronik•com> writes:
>
>> The manpage of git commit reads:
>>
>>   --only
>>
>>       Make a commit only from the paths specified on the command line,
>>       disregarding any contents that have been staged so far. This is
>>       the default mode of operation of git commit if any paths are given
>>       on the command line, in which case this option can be omitted. [...]
>
> "--only" is as opposed to "--also".  Two modes of partial commits
> are:
>
>  - "--also" which updates the index with the whole contents of the
>    given paths and record the resulting index as the tree of the new
>    commit;
>
>  - "--only" which starts from a new temporary index initialized from
>    HEAD with the whole contents of the given paths and record the
>    resulting index as the tree of the new commit, and then updates
>    the original index with the whole contents of the give paths.
>
> In other words, you give paths from the command line to tell the
> command that you want to record the contents of them in the working
> tree as a whole to be recorded in the resulting commit.

s/also/include/; "--also" was its original name of the option while
it was in development.

  reply	other threads:[~2014-11-07 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 10:38 git commit --only -- $path when $path already has staged content Stefan Näwe
2014-11-07 16:57 ` Junio C Hamano
2014-11-07 16:57   ` Junio C Hamano [this message]
2014-11-07 19:54   ` Junio C Hamano
2014-11-10  7:18     ` Stefan Näwe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqioirgd7v.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=stefan.naewe@atlas-elektronik$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox