Initializing a New Local Git Repo From Subversion
Method 1 - not using the svn standard /trunk /branches /tags off of project root
- git svn init /path/to/your/project/root
- git svn fetch
Method 2 - using the svn standard /trunk /branches /tags off of project root
- git svn init /path/to/your/project/root -s
- git svn fetch
During the init, you might notice a message about "using higher level of URL." This is normal.
Submitting an Existing Git Repo Into Subversion
Method 1 - not using the svn standard dir structure
- svn mkdir --parents /path/to/your/project/root/
- git svn init /path/to/your/project/root
- git svn fetch
- git rebase trunk
Method 2 - using svn standard dir structure for a project
- svn mkdir --parents /path/to/your/project/root/trunk /path/to/your/project/root/branches /path/to/your/project/root/tags -m "standard svn project folders"
- git svn init /path/to/your/project/root -s
- git svn fetch
- git rebase trunk
- git add -A
- git commit -m "adding my changes, including new files"
- git svn dcommit
- git log
No comments:
Post a Comment