Simple and rough, the orders are as follows:
git svn clone https://localhost:8443/svn/www/–no-metadata–trunk=trunk www
Parameter description:
The no metadata parameter is to prevent Git from exporting the additional information that SVN contains, so the record submitted to Git will look "clean"
Trunk Main Branch
Name of git project created by www
The execution process may have an SVN account input, anyway, the username and password.
2. After cloning the code, this is already a git under the checkout project, but he has no code base source, simply that he does not have a git under the fixed home (his birth mother is svn, he must find a stepmother), so first in your GitHub, Or your company built a git platform, to create a WWW project git library, of course, can also create their own local, here is not detailed, and so on the code deployment will be said.
For example, the code library is as follows:
Git@gitlab.xxx.com:second/test.git
To prove that WWW does not have a new mother, you can use the command:
git remote-v Check to see if there is a source, it's done.
The next step is to bring your WWW library back to Test.git, the mother's home, as follows:
git remote add git@gitlab.xxx.com:second/test.git
Once you've done that, you can perform another git remote-v you'll find as follows:
Origin just Google translated a bit, is the meaning of origin, in fact, in the implementation of GIT remote add originally need to give the source a name, such as release source
You need to enter git remote add release git@gitlab.xxx.com:second/test.git, because www has no source, so the addition becomes the default source, which is the origin, so omit the origin
Here, has completed the process of understanding the new mother, what's next, yes, all the code to get home, orders as follows
git push
The code is complete from SVN to git.
In fact, in this process seems to have missed a step, did not create a branch under Git, git branch-a look, found that the default main branch master has been automatically created