We have an SVN setup with a stable branch and an unstable development branch. Dev work (mostly) is done on a branch, and then merged with the trunk before deployment.
I use git-svn as my SVN client. My process of merging from an unstable state to a trunk is as follows:
git svn fetch
git co -b trunk svn/trunk
git merge --no-ff svn/unstable
git svn dcommit
svn/* - remote branches of SVN.
This, of course, requires that no one do anything with the chest before I finish, but in practice this is not a problem.
The benefits of this process are that git now records merge parents in my local repository. This does not help my colleagues, but allows git to calculate a common ancestor when I do a merge. This is very desirable.
And here it is rub. When someone does a merge, git doesn't know about it. Here is an example:
o-...-A
/
X
An unstable branch was created at point X. At point A, we decided to merge the changes from the unstable branch to the stable branch at point B. The common ancestor is correct X.
Since the merge is not recorded in the git history, the next merge in C again assumes that X is a common ancestor. I would like it to be A, as in the following graph:
o-...-A
/ \
X
It is not necessary to get a graph that looks the same as the one shown in the picture. Any graph that recognizes A as a common ancestor is fine with me.
I have some options, such as the correct use of a git filter branch or a "fake" commit, which is never given to SVN. However, none of my attempts have so far worked.
, . . , , "".