git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Newbie question: how to move bunch of files

From
Chris Packham <judge.packham@gmail.com>
Date
Nov 8, 2010, 22:14 UTC
Message-ID
<AANLkTik9aQaV1OvARuPchekYpQFANu-+k3c2n3wamzXh@mail.gmail.com>
In-Reply-To
<4CD86204.1000805@gmail.com>
Hi,
On Tue, Nov 9, 2010 at 9:48 AM, mat <matthieu.stigler@gmail.com> wrote:
Show 10 quoted lines
> Dear list
>
> I am very sorry to bother you with such a simple question, but I searched
> for a while on the net and did not come up with any satisfying answer :-(
>
> I just want to move a bunch of files (from /R to /pkg/R ), but get the
> error:
> $ git mv R/*.R pkg/R/
> fatal: not under version control, source=R/nll_MSAR3.R,
> destination=pkg/R/nll_MSAR3.R

This is the kind of error you get from asking git to move a file it isn't tracking.

Have you got generated files in the same location as your repository? I get the same kind of thing if I ask git to move generated files

   git mv foo/*.pyc bar/
   fatal: not under version control, source=foo/ast.pyc, destination=bar/ast.pyc

To get around this you could change your wildcard to only include files you are tracking or specify them individually. Alternatively you could just use 'mv R/*.R pkg/R/' then 'git rm' the old files and 'git add' the new files you want to track, git should detect the renames after the 'git rm' and 'git add'. As a final alternative you could also 'git clean -d' to remove the untracked files but be careful with that as you may not have added some files you are meaning to track.

Show 13 quoted lines
> What do I do wrong? Would you kindly indicate me what I should do?
>
> Thanks a lot and sorry again!
>
> Matthieu
>
> PS: I am using git 1.7.0.4 on Ubuntu 10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: matNext: Matthieu Stigler
Message 2 of 3 in “Newbie question: how to move bunch of files”
  1. matNov 8, 2010
  2. Chris PackhamNov 8, 2010
  3. [SOLVED] Newbie question: how to move bunch of filesMatthieu Stigler, Nov 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.