I'm using git-svn
to work against my company's central svn
repository. We've recently created a new feature branch in the central repo. How do I tell git
about it? When I run git branch -r
I can only see the branches that existed when I ran fetch
against the svn
repo to initialize my git
repo?
相关问题
- 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
You can manually add the remote branch,
Instead of dealing with the git-svn quirks you may try SubGit.
One has to install SubGit into Subversion repository. After that one can use standard git workflow instead of using special git-svn commands:
Pushing new commits:
git-svn:
SubGit:
Fetching incoming changes
git-svn:
SubGit:
Creating a new branch:
git-svn:
SubGit:
See SubGit documentation for more details.
A simplification of vjangus' answer:
If you're using the standard layout in SVN and have done the usual svn init, git-svn will do the config stuff for you. Just:
An example. SVN url is
svn+ssh://gil@svn.myplace.com/repo
. SVN branch I'm looking for isnewbranch
. Local git branch (tracking remotenewbranch
) will begit-newbranch
.Step 1: find the branch-copy revision
So the branch point in SVN is revision 7802.
Step 2: Fetch the revision
git-svn did all the work and now knows about the remote:
Step 3: Create your new local branch tracking the remote one: