Home > SVN > SVN rename – pitfalls to avoid

SVN rename – pitfalls to avoid

Here’s a pitfall you should avoid when you use “svn rename” for files, or directories.

Once you have done a “svn rename”, it is better to do a “svn commit” before you start modifiying the contents of the renamed files.  Otherwise you are likely to encounter “local modifications” messages, or “versioning” warning messages, which can hinder your commit activities later.

If you are already in the problematic territory, what you can do is to:

  1. Copy the renamed file to a back-up file.
  2. Do a “svn delete –force” on the renamed file.
  3. Do a “svn commit” on the renamed file.
  4. Copy the back-up file back to the renamed file.
  5. Do a “svn add” on the renamed file.
  6. Do a “svn commit” on the renamed file.
Categories: SVN
  1. December 2, 2010 at 1:10 am

    Nice small tut. thx!

  2. Zihan
    November 2, 2011 at 1:45 am

    Useful info Thanks

  3. December 8, 2011 at 6:44 pm

    Svn can be tricky sometimes, thanks!

  4. Fernando
    October 20, 2012 at 4:41 am

    Yeah but I don’t what to loose the file history 😦

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: