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.
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…
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.
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:
(export your svn repo to a directory if you have one)
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: Parked at Loopia
git init and commit setup the repo as you would normally with git
add the origin (like github) and push to origin. Great, you now haz
open source!
setup capistrano to deploy to your server
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