chowwy
chowwy

Reputation: 1126

Update SVN repository on dev server

Here's how my SVN is set up:

1 - I have an SVN repository on my server and a local repository on my laptop
2 - I have checked out a copy of the SVN repository onto my development server
3 - I've got a post-commit hook that pushes changes made to the SVN repository onto the development server

I had a file open today (file.php) and wanted to see whether the dev server had the same version as my repository. So I checked and everything matched. Then I noticed something that I needed to change in the file. I thought I was changing the file on my local repository--turns out I changed the file on the development server by mistake.

My question is this: how can I get the development server back in sync with the repository? Do I need to update the dev server with the latest repository? Or do I need to commit the dev server repository to the main repository?

Upvotes: 0

Views: 340

Answers (1)

Don Zacharias
Don Zacharias

Reputation: 1564

If you commit the file you will be changing that file in the repository, so I don't think you want to do that. And if you simply update the file your local edits will remain. I think what you want to do is preserve those edits (e.g. Make them on your laptop, if simple enough) and then Revert the changes you made on the dev server. Or you can simply delete that file on the dev server and Update its parent folder which will pull down the repository copy of that file :)

Upvotes: 1

Related Questions