I have checked out a svn repository using git svn. Now I need to checkout one of the branches and track it. Which is the best way to do it?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Standard Subversion layout
Create a git clone of that includes your Subversion trunk, tags, and branches with
The
--stdlayout
option is a nice shortcut if your Subversion repository uses the typical structure:Make your git repository ignore everything the subversion repo does:
You should now be able to see all the Subversion branches on the git side:
Say the name of the branch in Subversion is
waldo
. On the git side, you'd runThe -svn suffix is to avoid warnings of the form
To update the git branch
waldo-svn
, runStarting from a trunk-only checkout
To add a Subversion branch to a trunk-only clone, modify your git repository's
.git/config
to containYou'll need to develop the habit of running
to update all of what
git svn
thinks are separate remotes. At this point, you can create and track branches as above. For example, to create a git branch that corresponds to mybranch, runFor the branches from which you intend to
git svn dcommit
, keep their histories linear!Further information
You may also be interested in reading an answer to a related question.