git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Newbie question: how to move bunch of files
@ 2010-11-08 20:48 mat
  2010-11-08 22:14 ` Chris Packham
  0 siblings, 1 reply; 3+ messages in thread
From: mat @ 2010-11-08 20:48 UTC (permalink / raw)
  To: git

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Newbie question: how to move bunch of files
  2010-11-08 20:48 Newbie question: how to move bunch of files mat
@ 2010-11-08 22:14 ` Chris Packham
  2010-11-09 10:22   ` [SOLVED] " Matthieu Stigler
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2010-11-08 22:14 UTC (permalink / raw)
  To: mat; +Cc: git

Hi,

On Tue, Nov 9, 2010 at 9:48 AM, mat <matthieu.stigler@gmail.com> wrote:
> 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.

> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [SOLVED] Newbie question: how to move bunch of files
  2010-11-08 22:14 ` Chris Packham
@ 2010-11-09 10:22   ` Matthieu Stigler
  0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Stigler @ 2010-11-09 10:22 UTC (permalink / raw)
  To: git; +Cc: Chris Packham

Dear Chris

Thanks a lot for your fast and relevant reply! This was indeed the case, 
i.e. non-tracek files in the folder, whiohc hindered to move it 
properly! I had not understood it from the error message, but then I 
removed those and it worked!

Thanks!!

Matthieu

Le 08. 11. 10 23:14, Chris Packham a écrit :
> Hi,
>
> On Tue, Nov 9, 2010 at 9:48 AM, mat<matthieu.stigler@gmail.com>  wrote:
>    
>> 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.
>
>    
>> 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
>>
>>      

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-09 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 20:48 Newbie question: how to move bunch of files mat
2010-11-08 22:14 ` Chris Packham
2010-11-09 10:22   ` [SOLVED] " Matthieu Stigler

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).