How do you move a file?

2019-01-08 04:07发布

I'm using TortoiseSVN against the SourceForge SVN repository. I'd like to move a file from one folder to another in order to maintain its revision history. Is this possible? If so, how do you do it?

(My current strategy has been to copy the file into the new folder and check it in and then delete the file from the current folder.)

12条回答
做自己的国王
2楼-- · 2019-01-08 04:26

Subversion has native support for moving files.

svn move SOURCE DESTINATION

See the online help (svn help move) for more information.

查看更多
Lonely孤独者°
3楼-- · 2019-01-08 04:28

Cut file via operating system context menu as you usually do, then instead of doing regular paste, right click to bring context menu, then choose TortoiseSVN -> Paste (make sure you commit from root to include both old and new files in the commit).

查看更多
对你真心纯属浪费
4楼-- · 2019-01-08 04:28

If I'm not wrong starting from version 1.5 SVN can track moved files\folders. In TortoiseSVN use can move file via drag&drop.

查看更多
我只想做你的唯一
5楼-- · 2019-01-08 04:31

Using TortoiseSVN I just right-click and drag the folder from one location to another. When you release the right-click you'll have the option to "SVN Move Version File." However, I believe that SVN doesn't do anything "fancy" there, but simply deletes the file in the previous location and Adds it to the new location.

查看更多
6楼-- · 2019-01-08 04:31

Since you're using Tortoise you may want to check out this link on LosTechies. It should be almost exactly what you are looking for.

http://www.lostechies.com/blogs/joshua_lockwood/archive/2007/09/12/subversion-tip-of-the-day-moving-files.aspx

查看更多
爷的心禁止访问
7楼-- · 2019-01-08 04:32

In TortoiseSVN right click somewhere and go TortoiseSVN > Repo Browser open the repository.

All you then have to do is drag and drop the file from one folder to the where you want it. It'll ask you to add a commit message and it defaults it to "Moved file/folder remotely"

查看更多
登录 后发表回答