Or if you want to keep a copy of the SVN repo and work with the GIT repo in another folder then you can use the 2nd part. I would personally in this situation would want to abandon the SVN repo and work only using GIT. The issue I am discussing is that when you create the git repo it resides in the same directory as the SVN repo. Now whenever you push something to the bare-repo then the changes are already reflected in the git repo whose path is given in post-receive file. Inside hooks folder in the bare repo create a file post-receiveĪdd the following content to the post-receive file #!/bin/sh Using git-hooks to update the cloned repo when the bare repo is updated. Now clone the bare git repo to a new repo.Push the SVN pulled repo to the git bare repo.Add this repo as remote to the SVN pulled repo.Create a bare git repo using git init –bare.In order to remove that the following steps provide a solution: One problem which you will face is that now in the tortoiseGIT menu you will see SVN options as well. It will take some time depending on your SVN repository size but in the end you will be presented with a Git repository in your folder. Choose “From SVN Repository” and uncheck all boxes. Now right clock on the folder and select the “Git Clone …” option.Create a new folder where you want to clone the repository.Here are the steps I used using tortoiseGit to clone my SVN repository as a Git repository. So, I decided to use TortoiseGIT which is a Windows based tool for git repositories. However, I was looking for some Windows based solution which is easy to use and GUI based as I have to show it to my team as well. The github site gives a good link on how to do it on a linux machine: So, after looking on the internet I found a few solutions using git-svn. I wanted to do the latter as I want to ensure that the commit logs are maintained across the clone. I convert the whole SVN repository into Git repository.I use the latest stable code and then check it into the latest GitHub repository.So, I decided to take the initiative to convert our SVN repository ready for GIT. I proposed to my team to switch to Git as we can also use GitHub after that for making our code public. Recently, I have been working on a project of ours which uses SVN as a default version control system. I enjoy using git because of its simplicity and speed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |