From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: KES <kes-kes@yandex.ua>, git <git@vger.kernel.org>
Subject: Re: Can not 'git add file'
Date: Sun, 03 Jan 2016 17:20:02 +0100 [thread overview]
Message-ID: <1451838002.3109.2.camel@kaarsemaker.net> (raw)
In-Reply-To: <1500251451832791@web17m.yandex.ru>
On zo, 2016-01-03 at 16:53 +0200, KES wrote:
> Untracked files:
> (use "git add <file>..." to include in what will be committed)
>
> 4 ../lib/Devel/DebugHooks/
>
> $ git add -p ../lib/Devel/DebugHooks/Commands.pm
> No changes.
>
> I want to start track file here, but I do not want to stage while
> file.
>
> It seems the git can not process this case and do not allow me to
> complete that.
Correct, add -p for a new file is not supported, as it doesn't really
make sense. There's no patch, it's a whole new file.
What you can do instead is first
git add -N ../lib/Devel/DebugHooks/Commands.pm
to mark the file as tracked without adding content. Then git add -p
will allow you to add the contents partially.--
Dennis Kaarsemaker
www.kaarsemaker.net
prev parent reply other threads:[~2016-01-03 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 14:53 Can not 'git add file' KES
2016-01-03 16:20 ` Dennis Kaarsemaker [this message]
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=1451838002.3109.2.camel@kaarsemaker.net \
--to=dennis@kaarsemaker.net \
--cc=git@vger.kernel.org \
--cc=kes-kes@yandex.ua \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.