I am developing using git
but I have to publish via svn
.
That's why I've set up git-svn
(by git svn clone
).
My usual workflow is like this:
git svn rebase # get local git repository up-to-date
git add file # add some code
git commit # commit code to local git repository
git svn dcommit # push changes from local git repository to public svn repository
So far this works fine.
However, I would like to create a branch (say secret
) in my local git
repository that is completely ignored by git-svn
.
I guess I have to do something like this:
git svn rebase # get local git repository up-to-date
git branch secret # create secret branch in local git repository
git checkout secret # switch to secret branch in local git repository
git add secret.file # add some secret code
git commit # commit secret code to secret branch of local git repository
git checkout master # switch back to public branch in local git repository
git svn rebase # get public branch of local git repository up-to-date
git add public.file # add some public code
git commit # commit public code to public branch of local git repository
git svn dcommit # push public changes from local git repository to public svn repository
Would this workflow keep secret.file
completely hidden from svn
?
If so, I guess I could just git merge
it into master
and git svn dcommit
it to the svn
it once it gets 'un-classified'. Is that correct?
Also, would it be possible to rename master
to public
for clarity?
If so, how? Note that there is already a history for that branch in both repositories.