My colleague and I have an energetic discussion about merger strategies, and I hope that we can get some information to help solve it.
tl: dr: If we use merge or redirect when transferring changes from the remote branch, so that we do not constantly review the resolution of the conflict.
- svn: our main gold repository
- trunk: git svn remote branch tracking. Used to change the git parameter to dommiting to subversion.
- feature-branch: git remote branch, which combines the work of two colleagues on one function.
- colleague 1: local branch of the first colleague.
- colleague2: second affiliate colleague.
We use Sebastien Varette's excellent workflow from Is git-svn dcommit dangerous after merging into git? .
The problem that we get is that every time colleague1 reinstalls from svn (by reinstalling it in the trunk and then rebooting for colleague1 before moving to the functional branch when it is completed), it performs a branch function, conflicting with each other, done. The same conflict resolution needs to be repeated again and again - every time rebu svn workflow is executed.
Please note that we are using git rebase mirror un-3451
for this rebase.
My argument is that we should use git merge mirror un-3451
. I understand that this will produce a commit, which is marked as a merge of the two previous commits. Therefore, git would know not to use previous commits, but instead uses compilation.
My colleague, on the other hand, argues that using merge will make merging with svn much more difficult and prefers to use rebase. He believes that this is easy - unfortunately, he is not the one who resolves all conflicts. He claims that using squash fixes will have the same effect.
My argument is that merging has the same effect as squash, but includes marking the commits that were included.
State 1
svn-trunk: A \ git-trunk: A' \ remote-feature: A'
State 2
C conflicts with D in file 1 (F1). F1 resolves the conflict, so D becomes D '.
git pull --rebase remote feature git add F1 git rebase --continue git push
Fixation Schedule:
svn-trunk: A
State 3
Now, colleague1 wants to pull the changes from svn-trunk:
git checkout trunk git svn rebase
and then reinstall them to c2 function
git checkout feature-branch git rebase trunk
Babas puts B1 on a c2 function and then C and then captures D 'and forces the same conflict resolution to become D' '
Fixation Schedule:
svn-trunk: A
Every time a git checkout trunk; git svn rebase; git checkout feature-branch; git rebase trunk; git push remote
loop occurs git checkout trunk; git svn rebase; git checkout feature-branch; git rebase trunk; git push remote
git checkout trunk; git svn rebase; git checkout feature-branch; git rebase trunk; git push remote
git checkout trunk; git svn rebase; git checkout feature-branch; git rebase trunk; git push remote
, all conflict resolution should be done over and over again.
Questions
- if you reinstall from svn, click on the remote branch, ask colleague2 to push some commits to the remote branch, and then later, colleague1 will merge with the remote branch, as a result of the merge, svn commits will be mentioned (and therefore cause a problem in subsequent permutations) .
- Which is better in the above scenario: rebase or merge?
- Will there be a more functional reerere function?
Thank you very much!