wiki:PostCvtMergePoint

Version 1 (modified by Beman Dawes, 9 years ago) ( diff )

--

Establishing a merge point after SVN Conversion

Introduction

When you are ready to merge the develop branch to master (or better yet a release branch that's branched off master), there's a bit of housekeeping to be done the first time after the conversion from svn so that future merges proceed smoothly. We're going to create a merge point between the develop and master branches so that Git knows the last point the two branches were in synch. Once we've done that Git will perform a merge by replaying the commits on develop on top of master, starting from the last known merge: in other words Git will perform the tricky stuff of figuring out what to merge for us.

You probably want to do this procedure before you start routine maintenance on your library.

Preparation

Step-by-step

  • Navigate to the history for your library on GitHub, starting with branch master. For example the Config library can be seen here.
  • Look down through the commit history and make a note of the last merge in svn land. In our example, it was on October 25th 2013.
  • Use the dropdown box to change the history to point to the develop branch. Config library can be seen here.
  • Find the last commit before the date noted above. Click on the commit message for that commit to go to the actual diff for that change, in our example here. The SHA1 for that commit is shown below and to the right of the commit message, in this case it's 67f6b934f161dc5da2039004986a14d9217afae4. Copy that SHA1 to your clipboard.

Create a merge to that specific commit. Begin by changing your library to the master branch:

git checkout master

Now create a merge to the specific commit above; since we don't really want to actually change the master branch we'll use the -s ours option to avoid any conflicts:

git merge --no-ff --no-commit -s ours 67f6b934f161dc5da2039004986a14d9217afae4

Caution: Check any changed files carefully, particularly if you thought master was up-to-date. You can use git status and git diff to check for modifications. In the example case there are none. If all is as expected, make the commit and push to GitHub:

git commit -am "Create first merge point for Git"
git push

Then navigate to your libraries history again, and check that the merge shows up, our config example is here. You're now ready for "routine" merges to proceed as per Git Flow (or whatever other strategy you wish to use).

Note: See TracWiki for help on using the wiki.