Reputation: 13492
We are using SVN from starting of our project ,but recently our team migrated from SVN to GIT repository,but for all this migration work I was totally out of sync because i was working on some of the feature so i was using SVN code base because it was active that time.
Now i made plenty of changes in my local code base and in server SVN repository no more active,is this possible to disconnect the SVN repository and connect same code base to GIT repository so i can commit the my changes into GIT repository? OR I have to manually achieve this and such type of code commit not supported?
Upvotes: 1
Views: 80
Reputation: 1323833
If you don't care about the history of those changes done in SVN, you can simply report them in a new clone of your Git repository:
git clone /url/git/repo afolder
cd afolder
git --work-tree=/path/to/SVN/workspace add .
git status
# check what was added, you might need to tweak your `.gitignore`
# especially to ignore any `.svn/` folder
git commit -m "Import from SVN workingspace"
git push
(Assuming here you are importing that code on the default master branch)
The idea is to reference the folder where you did your changes in your local SVN working directory, and use that as a git working tree, for Git to detect any change/addition/suppression of files with its own content.
This is not about converting a local SVN working tree to a Git repository.
Here, the conversion was already done, but some concurrent work was also made in the SVN local working directory: the commands above are for importing those changes to the Git repo.
Upvotes: 2