git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Ågren" <martin.agren@gmail.com>
To: Tillson Galloway <tillson.galloway@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Bug Report - Segmentation Fault on "git add --all"
Date: Thu, 20 Jul 2017 07:01:39 +0200	[thread overview]
Message-ID: <CAN0heSrzdfpH=ocQrC3SYLNF2K=agdKuRdscSPnnCgBMWhPRxg@mail.gmail.com> (raw)
In-Reply-To: <CAO1QjAFGnK+riGT_ZffM_-=ymJm08U8adOfHV4wrhR9LJLhSAA@mail.gmail.com>

On 20 July 2017 at 02:54, Tillson Galloway <tillson.galloway@gmail.com> wrote:
> Context:
> We currently have a git project with a root directory ("~/project")
> for pipelines and deployment of a Node app, and then a subdirectory
> ("~/project/project-app").
> After realizing that we didn't need the node app in a subdirectory, we
> moved the full app into the root directory (using the mv command).
>
[...]
>
> Running "git status" shows that git successfully tracked that the
> original files within ~/project/project-app were deleted, but it did
> not pick up the "newly created" files from moving.

So you did "mv project-app/* ." and see something like

  Changes not staged for commit:
    (use "git add/rm <file>..." to update what will be committed)
    (use "git checkout -- <file>..." to discard changes in working directory)

      deleted:    ... lots of files ...

? That means Git has *realized* that the files are gone, but it's not
*tracking* that fact (yet).

What if you restore the files and instead try "git mv project-app/*
."? It will move the files like "mv", but it will also do basically
what you wanted to achieve with "git add --all". After that, you'll
just have to "git commit".

You'll probably want to "rmdir project-app/" once it's empty. If you
have some structure like project-app/project-app/ the move might fail
(should be possible to work around).

This obviously doesn't address the problem you saw and on which I
cannot comment, but I hope it helps you do what you actually wanted to
do. :)

Martin

      reply	other threads:[~2017-07-20  5:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20  0:54 Bug Report - Segmentation Fault on "git add --all" Tillson Galloway
2017-07-20  5:01 ` Martin Ågren [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='CAN0heSrzdfpH=ocQrC3SYLNF2K=agdKuRdscSPnnCgBMWhPRxg@mail.gmail.com' \
    --to=martin.agren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tillson.galloway@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).