[svn] How do I move a file (or folder) from one folder to another in TortoiseSVN?

I would like to move a file or folder from one place to another within the same repository without having to use Repo Browser to do it, and without creating two independent add/delete operations. Using Repo Browser works fine except that your code will be hanging in a broken state until you get any supporting changes checked in afterwards (like the .csproj file for example).

Update: People have suggested "move" from the command line. Is there a TortoiseSVN equivalent?

This question is related to svn tortoisesvn

The answer is



From the command line, you can type svn mv path1 path2. This will create an add and a delete operation, but there's not really a way around that - as far as I know - in Subversion.


In Windows Explorer, with the right-mouse button, click and drag the file from where it is to where you want it. Upon releasing the right-mouse button, you will see a context menu with options such as "SVN Move versioned file here".

http://tortoisesvn.net/most-forgotten-feature


Subversion does not yet have a first-class rename operations.

There's a 6-year-old bug on the problem: http://subversion.tigris.org/issues/show_bug.cgi?id=898

It's being considered for 1.6, now that merge tracking (a higher priority) has been added (in 1.5).


svn move — Move a file or directory.

http://svnbook.red-bean.com/en/1.0/re18.html


You have to drag the file using the right mouse button. The moment you release the file to the new destination you will observe the option:

SVN move versioned files here.

Just select this option and you are done !!


If you want to move files around and keep the csproj files up to date, the easiest way is to use a Visual Studio plugin like AnkhSVN. That will automatically commit both the move action (as an delete + add with history, because that's how Subversion works) and a change in the .csproj


Use Tortoise's RENAME command, and type in a relative path ("folder/file.ext").


If you want to move files around and keep the csproj files up to date, the easiest way is to use a Visual Studio plugin like AnkhSVN. That will automatically commit both the move action (as an delete + add with history, because that's how Subversion works) and a change in the .csproj


Use the svn move command to move file/folder.


svn move — Move a file or directory.

http://svnbook.red-bean.com/en/1.0/re18.html


You have to drag the file using the right mouse button. The moment you release the file to the new destination you will observe the option:

SVN move versioned files here.

Just select this option and you are done !!


As mentioned earlier, you'll create the add and delete commands. You can use svn move on both your working copy or the repository url. If you use your working copy, the changes won't be committed - you'll need to commit in a separate operation.

If you svn move a URL, you'll need to supply a --message, and the changes will be reflected in the repository immediately.


svn move — Move a file or directory.

http://svnbook.red-bean.com/en/1.0/re18.html


As mentioned earlier, you'll create the add and delete commands. You can use svn move on both your working copy or the repository url. If you use your working copy, the changes won't be committed - you'll need to commit in a separate operation.

If you svn move a URL, you'll need to supply a --message, and the changes will be reflected in the repository immediately.


Subversion does not yet have a first-class rename operations.

There's a 6-year-old bug on the problem: http://subversion.tigris.org/issues/show_bug.cgi?id=898

It's being considered for 1.6, now that merge tracking (a higher priority) has been added (in 1.5).


From the command line, you can type svn mv path1 path2. This will create an add and a delete operation, but there's not really a way around that - as far as I know - in Subversion.



Use the svn move command to move file/folder.


Subversion does not yet have a first-class rename operations.

There's a 6-year-old bug on the problem: http://subversion.tigris.org/issues/show_bug.cgi?id=898

It's being considered for 1.6, now that merge tracking (a higher priority) has been added (in 1.5).


From the command line, you can type svn mv path1 path2. This will create an add and a delete operation, but there's not really a way around that - as far as I know - in Subversion.



Use Tortoise's RENAME command, and type in a relative path ("folder/file.ext").


Subversion does not yet have a first-class rename operations.

There's a 6-year-old bug on the problem: http://subversion.tigris.org/issues/show_bug.cgi?id=898

It's being considered for 1.6, now that merge tracking (a higher priority) has been added (in 1.5).


As mentioned earlier, you'll create the add and delete commands. You can use svn move on both your working copy or the repository url. If you use your working copy, the changes won't be committed - you'll need to commit in a separate operation.

If you svn move a URL, you'll need to supply a --message, and the changes will be reflected in the repository immediately.


svn move — Move a file or directory.

http://svnbook.red-bean.com/en/1.0/re18.html


In Windows Explorer, with the right-mouse button, click and drag the file from where it is to where you want it. Upon releasing the right-mouse button, you will see a context menu with options such as "SVN Move versioned file here".

http://tortoisesvn.net/most-forgotten-feature



If you want to move files around and keep the csproj files up to date, the easiest way is to use a Visual Studio plugin like AnkhSVN. That will automatically commit both the move action (as an delete + add with history, because that's how Subversion works) and a change in the .csproj


In Windows Explorer, with the right-mouse button, click and drag the file from where it is to where you want it. Upon releasing the right-mouse button, you will see a context menu with options such as "SVN Move versioned file here".

http://tortoisesvn.net/most-forgotten-feature


Use the svn move command to move file/folder.


As mentioned earlier, you'll create the add and delete commands. You can use svn move on both your working copy or the repository url. If you use your working copy, the changes won't be committed - you'll need to commit in a separate operation.

If you svn move a URL, you'll need to supply a --message, and the changes will be reflected in the repository immediately.


Use the svn move command to move file/folder.


If you want to move files around and keep the csproj files up to date, the easiest way is to use a Visual Studio plugin like AnkhSVN. That will automatically commit both the move action (as an delete + add with history, because that's how Subversion works) and a change in the .csproj