On Wed, 2013-03-27 at 17:48 -0400, Dale R. Worley wrote:
> > From: Paul Smith <p...@mad-scientist.net>
> > 
> > So, I have a patch that was created with "git diff" (can't use
> > format-patch in my situation).  If the patch deletes files, such as:
> > 
> > then those deletes are reflected in Git after the "git apply", which is
> > good.  But, if my patch ADDS a file, such as:
> > 
> > then this file is just left in my workspace as an untracked file, and
> > not added with "git add".  This is annoying.
> What do you mean "those deletes are reflected in Git"?  According to
> the manual page, the file should be deleted in the working directory,
> but it won't be removed from the index.  Similarly in the second case,
> the file should be added in the working directory, but it won't be
> added to the index.

Sorry, I was unclear.  No, I didn't use --index as I wanted to see the
applied content before it was committed.

I ran "git diff -M -C master" to generate the patch of changes between
my working directory and the master branch, then ran "git apply" (no
arguments) in another workspace to apply it.

When apply is done and I run "git status -s", the files that were
specified as deleted in the diff are marked as " D" but the files that
were specified as added in the diff are marked as "??" (untracked), not
" A" as I'd expected.  Running "git commit" then will commit the deletes
but the added files continue to be untracked, not added (of course).

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to