Please provide tips for effectively using git with svn. What are your ‘best practices’?
Please provide tips for effectively using git with svn. What are your best practices?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you create the clone, use
--prefix=svn/. It creates nicer branch names.Also, don’t neglect the
--trunk,--tags, and--branchesarguments when doingcloneorinit.Fetching is one of the more time-consuming steps, so set up a cron job to do
git svn fetchin the background. This is safe because fetching doesn’t affect any of your working branches.( Background info on
git svn fetch: This command is executed first whenever you dogit svn rebase, so by doing this step ahead of time, yourgit svn rebasecall will usually be faster. Thefetchcommand downloads SVN commits and sticks them into special branches managed by git-svn. These branches are viewable by doinggit branch -r, and if you did the above step, they start with ‘svn/’. )Make sure you know how to use
git reflog. I’ve had a few occasions wheregit svn dcommitdied (usually because I tried to check in something huge) and my commit seemed to be lost. In every case, the commit was easily found in the reflog.