From: Ariel Date: Fri, 09 Dec 2016 18:26:58 GMT Subject: Re: git add -p with new file Message-ID: In-Reply-To: On Wed, 7 Dec 2016, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 8:18 AM, Ariel wrote: >> If you do git add -p new_file it says: >> No changes. >> Which is a rather confusing message. I would expect it to show me the >> content of the file in patch form, in the normal way that -p works, let me >> edit it, etc. > We could improve it a bit, suggesting the user to do git add -N. But > is there a point of using -p on a new file? I got into the habit of always using -p as a way of checking my diffs before committing, so I ran it out of habit on a new file as well and got that confusing message. It's even worse if you run it on multiple files, some changed, some added - the added ones are ignored completely, without any message at all. > It will be one big chunk, you can't split anything. That's fine, that's what I would expect. > Perhaps maybe you want to use 'e' to edit what's added? I might, but mainly it would show me what it was adding. -Ariel