We have a SVN repository with our source code. We really want to use local Git branches to develop new features and take advantage of Git capabilities like the merging algorithms.
Is that possible? If yes, could someone provide some information about how to perform that?
Yes. You will need to use git-svn.
First you will need to git svn clone
your SVN repository. Note that this will fetch every revision from the SVN server, and recreate the history as a Git repository. These Git repositories should not be shared by multiple developers. Each developer should run git svn clone
individually!
Then you can create local branches all you want using standard Git commands, since you basically have a standard Git repository with some extra SVN metadata for tracking SVN commits. You can use commands like git svn dcommit
to push commits in Git to the SVN server (each Git commit would become a separate SVN commit).
I would consider reading a good git-svn tutorial.
(If possible, you might also consider whether you would actually rather use git-svn to convert your SVN repository to a Git repository, and then discontinue use of SVN altogether.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With