How to merge branch back to trunk in SVN with all commit history? I know in Git I can use
merge -squash
Is there any equivalent command in SVN?
To create a merge of a branch and create a single commit for each commit in the branch you can use a script, I'm using the following:
#/bin/bash
BRANCH="http://your branch url"
for i in {1127..1138} # list of revisions
do
REV=$i
echo $REV $BRANCH
echo merged $REV from $BRANCH > tmps.commit
svn log -c $REV $BRANCH >> tmps.commit
svn up
svn merge -c $REV $BRANCH ./
svn commit -F tmps.commit
rm tmps.commit
done
This will check out each revision you specify for the specific branch and perform a commit on the current directory, thus preserving each single change with the corresponding message.