Search code examples
gitworkflowgit-svn

Needing a git-svn workflow suggestion to keep personal files away from svn


I am starting to read about git-svn now to use it with a project that use SVN.

I would like to have some files just for me (todo files, scratch code, etc), and I will like to keep track of them in the Git repository. Is it possible to have some files in the Git but not in the SVN repository?

I though about having a branch master that will be synchronized with the SVN repository and keep my work into another branch (work), but then I will need to merge/rebase work into master before pushing changes to SVN and remove these files and commits/log messages related to them... seems unpractical (and I don't know how to do it).

I am also thinking about adding a lot of comments into the code as I am understanding it, but most of them I should keep just for me.

Does anyone have a workflow suggestion to keep some files away from the SVN repository?

Or should I just forget this idea and have another git repository for this?


Solution

  • Don't be afraid to branch and merge, this is extremely easy with Git. Just keep the local changes on a separate branch, let's call it play, and do the rest of your work either on master (which I assume is synchronized with Subversion trunk) or feature branches.

    After pulling new changes from Subversion you could rebase play on top of master to get the latest code and resolve potential conflicts. If you change your mind and decide that some of play changes should be published, you can always cherry-pick individual commits on top of master and push them to Subversion.