Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving Directories with History

Tags:

svn

I have a SVN structure like this:

/Projects     /Project1     /Project2 /someFolder     /Project3     /Project4 

I would like to move all the projects into the /Projects folder, which means I want to move Projects 3 and 4 from /someFolder into the /projects folder.

The caveat: I'd like to keep the full history. I assume that every client would have to check out the stuff from the new location again, which is fine, but I still wonder what the simplest approach is to move directories without completely destroying the history?

Subversion 1.5 if that matters.

like image 558
Michael Stum Avatar asked Sep 20 '08 16:09

Michael Stum


People also ask

Does SVN move preserve history?

If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.

How do I move a directory in git?

The 'git mv' command is used for moving or renaming a file or directory. When you provide <destination> as the same type (file or directory), it renames the <source> file/directory (which must exist) to <destination>. file/directory.

How do I copy a directory from one Github repository to another?

Merge the files into the new repository B. Step 2: Go to that directory. Step 3: Create a remote connection to repository A as a branch in repository B. Step 4: Pull files and history from this branch (containing only the directory you want to move) into repository B.


2 Answers

svn help rename 

Moving/renaming in subversion keeps history intact.

like image 103
Apocalisp Avatar answered Sep 24 '22 21:09

Apocalisp


svn move SRC DST
$ svn move -m "Move a file" http://svn.red-bean.com/repos/foo.c http://svn.red-bean.com/repos/bar.c

svn move will keep your history.

like image 28
Geekygecko Avatar answered Sep 25 '22 21:09

Geekygecko