ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Git: converting svn repo & stuff

(1/2) > >>

f0dder:
OK, so I've pretty much decided to move from subversion to Git for source control needs. Obviously I'd like my old version history to be ported over from the svn repos, and I've pretty much got that nailed (although there's some quirks to work out, because some of the first stuff I put under version control didn't follow a standard layout).

The tricky part has to do with fSekrit. Eventually, I want to open-source it, but I don't want the full version history to be available to everybody (for instance there's some ugly code in the early versions, swearing in comments, hardcoded passphrases for testing purposes, ...). So, the question goes: is it possible to do a Git setup with two repositories: one with full version history, the other with the "public" version, and the ability to push commits to both repositories? Or will I have to accept that the "historic" repository as a  read-only archive, only pushing changes to the "live" publicly available one?

parkint:
There are many things about git that I am still learning (disclaimer: I am NOT an expert).
I believe the solution to your problem would be to set up a branch that is 'private'; only available to you.

Hopefully, someone with more experience will chime in here (and provide an example).

f0dder:
Hm, *scratches beard*.

I know I can set the locations a specific branch push to... so, the idea would be importing the svn repo, and having that push to my private repo. Then, branch off the latest revision to a "public" branch, which would push both to my private repo and a public one; this should keep version history just fine, and keep everything in my private repository.

However, since the public branch would be based off the private one, would pushing the public branch cause all the prior revisions to end up in the public repo .git data?

Deozaan:
I don't know how to do it, but I know it can be done in Mercurial. Not that that helps or anything. . .  :D

ecaradec:
you might rebase -i to rewrite you public branch, usually people do this before pushing in public to clean up the mess. It's might not be super easy to merge back changes from the public branch if other people do changes though.

Navigation

[0] Message Index

[#] Next page

Go to full version