Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I have one project in two SVN repositories?

Tags:

git

svn

Our I.T. dept doesn't allow connections to the SVN server from outside the physical office. (They're just kind of like that.) I need to work on projects when I'm not at the office.

I could just check out the project and wait until I come in to do a check-in. Maybe that would be best. But I like to check in frequently. I'm wondering if there's some way I can keep a project in two repositories and keep them both up to date. That way I'd always be able to check in somewhere in case my HD dies. I have my own repository on a VPS server that I use for personal projects.

I investigated the svn switch command. With my current project in both repos I tried switching my working copy from personal to work SVN servers...

$ svn switch --relocate svn+ssh://personalvps.com/svn/project/trunk svn://worksvn/project/trunk
svn: The repository at 'svn://worksvn/project/trunk' has uuid '2baef97e-42ce-488c-bbba-c2625158c643', but the WC has 'f13e1f32-dc92-4c4a-b84d-34a59fe32063'

Then I tried adding the --username and --password params but got an error saying "no entry found."

Is this even possible or is it totally impractical?


UPDATE

Thanks for the answers. Unfortunately, any solution that involves action from I.T. (slight policy change, change a setting somewhere, install something) is not on the table. I have to find a solution within the current setup, which is no connections from outside except our Web servers.

I'll take a look at distributed version control.

like image 205
Ethan Avatar asked Jan 08 '09 21:01

Ethan


People also ask

Should you have one repository per project?

You should create separate repository for each project. Saves a lot of confusion. When rebasing in Git, why do people first rebase master in branch then rebase that branch in master?

Can a repository have multiple projects?

Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo.


1 Answers

You could use SVN with another (local) repository on your laptop. Look for the popular git or SVK. These allow you to commit to the local repository first and then sync all commits to the main SVN repository.

like image 109
Dirk Vollmar Avatar answered Nov 15 '22 07:11

Dirk Vollmar