rails project from svn to git WITHOUT history

This is not the best place to ask, but I figure another railer may
have run into this situation:

I'm moving a svn repo to git.

I DONT want to push the the svn history upstream.

Without the negativity: I want the git repo to be clueless about the
pre-git history.

Anyone else run into a solution for this?

It's for a project I'm taking open source and I'd like a blankish
slate.

Sudara

This is not the best place to ask, but I figure another railer may
have run into this situation:

I'm moving a svn repo to git.

I DONT want to push the the svn history upstream.

Without the negativity: I want the git repo to be clueless about the
pre-git history.

Anyone else run into a solution for this?

It's for a project I'm taking open source and I'd like a blankish
slate.

mm, I don't exactly get your problem. Wha's wrong with just doing svn
export to get
a clean version and then import it into git?

Regards,
Rimantas

mm, I don't exactly get your problem. Wha's wrong with just doing svn
export to get
a clean version and then import it into git?

This would be my suggestion as well. AFAIK, a simple
svn export svn://repos foldername
cd foldername
git init
should do the trick. At this point you would then be ready to host it
somewhere.

Further reading:
http://gitorious.org/about
https://github.com/ [I have a few beta invites if you're desperate to
use github, but gitorious seems functionally identical]
http://www.bluishcoder.co.nz/2007/09/how-to-publish-git-repository.html
http://blog.nanorails.com/articles/2008/1/31/getting-started-with-git
http://toolmantim.com/article/2007/12/5/setting_up_a_new_remote_git_repository
http://toolmantim.com/article/2007/12/5/sharing_git_repositories_via_os_xs_built_in_web_sharing

Hope that helps,
Shane

Something in my chain is too complex, methinks...

I currently have a live site running off SVN, deployed with
Capistrano.

I thought git could help me manage an open source branch, so that I
can make changes, and at will merge them into my open source and my
production branches (which i would then git-svn dcommit to svn and
deploy as usual).

The problem is that I can't find a way to 'desanitize' my open source
branch so that it is available to the public without the various
config files. In other words, a shallow copy that doesn't contain the
SVN history and loads of private config. I've read that one CAN make a
shallow git clone but actually, you can't then push this clone. Is
that true?

Do you recommend that i delete my production config, commit to svn,
svn export, git init, create open source and production branches, then
re-add the config on my production branch, then git-svn dcommit to
deploy? That sounds like it may be the only actual route, but seems
excessive. I guess I could actually abandon SVN completely....somehow
I thought I may be missing an option here...

thanks!

sudara

Thanks for those links, by the way, they are good git reading.

This would be my suggestion as well. AFAIK, a simple
svn export svn://repos foldername
cd foldername
git init
should do the trick. At this point you would then be ready to host it somewhere.

So...this would break any existing tie with SVN, which I don't want to
do as I'm deploying with SVN to production.

I'm pretty confused at this point, but the deal is I have a codebase i
want to push via svn into production and push to my origin remote
server.

The gotcha? I can't just branch and push to origin because the git
history contains private info.

Ok.

For future reference, if you are looking to use git to run a
production site AND open source the code to github or another public
repo, then you are crazy like me and need to:

1. (export your svn repo to a directory if you have one)
2. Move ALL of your sensitive production files OUT of the directory
(such as database.yml, etc) and in general polish it up for open
sourcibility
2.5 Edit your .gitignore file and make sure ALL production config is
being ignored. Here is mine: http://pastie.caboo.se/164371
3. git init and commit setup the repo as you would normally with git
4. add the origin (like github) and push to origin. Great, you now haz
open source!
5. setup capistrano to deploy to your server
6. On your server, add all your sensitive production files to /project/
shared/config
6.5 Locally, add all of your sensitive files BACK to your git repo
7. Add something like this to your deploy.rb: http://pastie.caboo.se/164369
8. Now, when you cap deploy, your production stuff will be symlinked
on each pull from the git repo
9. Now, when you git commit, your production stuff will be ignored,
and not pushed to origin

Make sense? I'm happy, as my repo is FINALLY up and running:

http://github.com/sudara/alonetone (need an invite?)