{"thread":{"id":"25679","subject":"Newbie question: how to move bunch of files","startedAt":"2010-11-08T20:48:04Z","lastAt":"2010-11-09T10:22:16Z","messageCount":3,"participants":["mat","Chris Packham","Matthieu Stigler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155430","messageId":"4CD86204.1000805@gmail.com","threadId":"25679","inReplyTo":null,"subject":"Newbie question: how to move bunch of files","fromName":"mat","fromEmail":"matthieu.stigler@gmail.com","sentAt":"2010-11-08T20:48:04Z","receivedAt":"2010-11-08T20:48:04Z","isPatch":false,"sender":{"key":"matthieu.stigler@gmail.com","avatar":null},"body":"Dear list\n\nI am very sorry to bother you with such a simple question, but I \nsearched for a while on the net and did not come up with any satisfying \nanswer :-(\n\nI just want to move a bunch of files (from /R to /pkg/R ), but get the \nerror:\n$ git mv R/*.R pkg/R/\nfatal: not under version control, source=R/nll_MSAR3.R, \ndestination=pkg/R/nll_MSAR3.R\n\nWhat do I do wrong? Would you kindly indicate me what I should do?\n\nThanks a lot and sorry again!\n\nMatthieu\n\nPS: I am using git 1.7.0.4 on Ubuntu 10.4\n"},{"id":"155440","messageId":"AANLkTik9aQaV1OvARuPchekYpQFANu-+k3c2n3wamzXh@mail.gmail.com","threadId":"25679","inReplyTo":"4CD86204.1000805@gmail.com","subject":"Re: Newbie question: how to move bunch of files","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-11-08T22:14:22Z","receivedAt":"2010-11-08T22:14:22Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nOn Tue, Nov 9, 2010 at 9:48 AM, mat <matthieu.stigler@gmail.com> wrote:\n> Dear list\n>\n> I am very sorry to bother you with such a simple question, but I searched\n> for a while on the net and did not come up with any satisfying answer :-(\n>\n> I just want to move a bunch of files (from /R to /pkg/R ), but get the\n> error:\n> $ git mv R/*.R pkg/R/\n> fatal: not under version control, source=R/nll_MSAR3.R,\n> destination=pkg/R/nll_MSAR3.R\n\nThis is the kind of error you get from asking git to move a file it\nisn't tracking.\n\nHave you got generated files in the same location as your repository?\nI get the same kind of thing if I ask git to move generated files\n\n   git mv foo/*.pyc bar/\n   fatal: not under version control, source=foo/ast.pyc, destination=bar/ast.pyc\n\nTo get around this you could change your wildcard to only include\nfiles you are tracking or specify them individually. Alternatively you\ncould just use 'mv R/*.R pkg/R/'  then 'git rm' the old files and 'git\nadd' the new files you want to track, git should detect the renames\nafter the 'git rm' and 'git add'. As a final alternative you could\nalso 'git clean -d' to remove the untracked files but be careful with\nthat as you may not have added some files you are meaning to track.\n\n> What do I do wrong? Would you kindly indicate me what I should do?\n>\n> Thanks a lot and sorry again!\n>\n> Matthieu\n>\n> PS: I am using git 1.7.0.4 on Ubuntu 10.4\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"155471","messageId":"4CD920D8.5040202@gmail.com","threadId":"25679","inReplyTo":"AANLkTik9aQaV1OvARuPchekYpQFANu-+k3c2n3wamzXh@mail.gmail.com","subject":"[SOLVED] Newbie question: how to move bunch of files","fromName":"Matthieu Stigler","fromEmail":"matthieu.stigler@gmail.com","sentAt":"2010-11-09T10:22:16Z","receivedAt":"2010-11-09T10:22:16Z","isPatch":false,"sender":{"key":"matthieu.stigler@gmail.com","avatar":null},"body":"Dear Chris\n\nThanks a lot for your fast and relevant reply! This was indeed the case, \ni.e. non-tracek files in the folder, whiohc hindered to move it \nproperly! I had not understood it from the error message, but then I \nremoved those and it worked!\n\nThanks!!\n\nMatthieu\n\nLe 08. 11. 10 23:14, Chris Packham a écrit :\n> Hi,\n>\n> On Tue, Nov 9, 2010 at 9:48 AM, mat<matthieu.stigler@gmail.com>  wrote:\n>    \n>> Dear list\n>>\n>> I am very sorry to bother you with such a simple question, but I searched\n>> for a while on the net and did not come up with any satisfying answer :-(\n>>\n>> I just want to move a bunch of files (from /R to /pkg/R ), but get the\n>> error:\n>> $ git mv R/*.R pkg/R/\n>> fatal: not under version control, source=R/nll_MSAR3.R,\n>> destination=pkg/R/nll_MSAR3.R\n>>      \n> This is the kind of error you get from asking git to move a file it\n> isn't tracking.\n>\n> Have you got generated files in the same location as your repository?\n> I get the same kind of thing if I ask git to move generated files\n>\n>     git mv foo/*.pyc bar/\n>     fatal: not under version control, source=foo/ast.pyc, destination=bar/ast.pyc\n>\n> To get around this you could change your wildcard to only include\n> files you are tracking or specify them individually. Alternatively you\n> could just use 'mv R/*.R pkg/R/'  then 'git rm' the old files and 'git\n> add' the new files you want to track, git should detect the renames\n> after the 'git rm' and 'git add'. As a final alternative you could\n> also 'git clean -d' to remove the untracked files but be careful with\n> that as you may not have added some files you are meaning to track.\n>\n>    \n>> What do I do wrong? Would you kindly indicate me what I should do?\n>>\n>> Thanks a lot and sorry again!\n>>\n>> Matthieu\n>>\n>> PS: I am using git 1.7.0.4 on Ubuntu 10.4\n>>\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>>\n>>      \n"}]}