I have a git repository in a directory a/b/, and I want to expand this so changes to a/ and subdirectories are stored too. Is there any way to do this simply?
views:
40answers:
2
+1
A:
Move b
to somewhere new, make a new directory in it called b
and git mv
the contents into it. Now cp
the stuff from a
(excluding the original b
of course) into here and git add
them.
thenduks
2009-11-18 14:39:53
That works, though sadly I can't use it in my actual repository - it's actually a git repository set up inside another proprietary repository and they don't play nicely at the best of times, let alone doing something a "bit different" like this. Thanks for the answer though :)
Ben Hymers
2009-11-20 11:19:23
+1
A:
Try this, starting from to dir of the git repository:
$ mkdir b
$ git mv * b/
$ git commit # describe that contents have moved
$ cd ..
$ mv b/* .
$ rmdir b
Jakub Narębski
2009-11-18 19:45:43