Git Svn

posted in: Non classé | 0

I love git, but most of my jobs use svn.

Fortunatly, you can use a local git repository, and push to a distance svn repository.

To clone from a repository on external drive

git svn clone "file:///u/[01] - Projet/PathToYourProject"

To have git svn AND git on the same project, first git svn clone then add your git repository

And more documentation here : https://git-scm.com/docs/git-svn

After that, you can switch to Git and keep all your history by mirroring your SVN to Git

git clone --mirror git@example.com/upstream-repository.git
// Or if your new git repository already exist
git push --mirror git@example.com/new-location.git
// Depth local clone (copy) ($(pwd) = local directory)
git clone --mirror --depth=1 file://$(pwd)/../originalRepo

More information here http://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/

Yes, I will not explain everything, just some personal tips. Find more online!

Leave a Reply

Your email address will not be published. Required fields are marked *