What remote branches are my local git-svn related branches?

I have the following .config file in my clone repository using git-svn:

 [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [svn-remote "svn"] url = https://svn.domain.com:8443/svn fetch = trunk:refs/remotes/trunk branches = branches/{some_branch}:refs/remotes/branches/* 

When I do git branch -a , I get:

 $ git branch -a * master remotes/branches/some_branch remotes/trunk 

How do I know to which remote branch the local master branch is attached (tracking)? Note that it seems that this answer should be specific to git-svn since the usual git solutions (e.g. git remote show origin ) do not work.

EDIT
Upon hearing my question, I am not sure if that makes sense. Basically, I just want to know which link the SVN is attached to. I assumed that the remote controls are branches, but they are actually just the URLs of other AFAIK repositories. So, I really want this mapping between the remote SVN branch and the local branch.

+1
source share
1 answer

what I really want is a mapping between the remote SVN branch and the local branch.

Answer: No (at least not in the usual sense).

Develop:

Usually in git you have two types of branches

The local branch can be associated with (and a copy of) the remote tracking branch (possibly with changes) - then the remote tracking branch is called the "upstream branch" of the local branch. This "upstream relationship" is stored in the repo configuration (.git / config) and displayed on the output of git branch -vv .

Now the point is this: git-svn does not have this concept of an upstream branch .

In particular, it does not preserve the upstream relationship in the git configuration, and therefore commands like git branch -vv cannot show this.

git uses the "branch upstream" to decide where to pull and where to click (more or less, configurable).

git-svn, in contrast, simply reverts to the history of the local branch to the last commit received from SVN (the last commit with "git-svn-id"). This commit also calls the SVN branch (i.e., Path to the SVN repo) from which it was created (it is part of the line after "git-svn-id"). git -svn will use this SVN branch.

This is described in the git-svn manpage :

Note the following rule: git svn dcommit will try to commit on top of the SVN command named in

git log --grep = ^ git -svn-id: -first-parent -1

This is not indicated in the manual, but I believe that git svn rebase uses a similar rule.

+1
source

Source: https://habr.com/ru/post/887775/


All Articles