From: Dennis Kaarsemaker Date: Sun, 03 Jan 2016 16:20:02 GMT Subject: Re: Can not 'git add file' Message-ID: <1451838002.3109.2.camel@kaarsemaker.net> In-Reply-To: <1500251451832791@web17m.yandex.ru> On zo, 2016-01-03 at 16:53 +0200, KES wrote: > Untracked files: > (use "git add ..." 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