Changes between Initial Version and Version 1 of PostCvtMergePoint


Ignore:
Timestamp:
Dec 28, 2013, 3:44:44 PM (9 years ago)
Author:
Beman Dawes
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PostCvtMergePoint

    v1 v1  
     1= Establishing a merge point after SVN Conversion =
     2[[PageOutline]]
     3
     4== Introduction ==
     5
     6When 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
     7the {{{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.
     8
     9You probably want to do this procedure before you start routine maintenance on your library.
     10
     11== Preparation ==
     12
     13== Step-by-step ==
     14
     15* Navigate to the history for your library on !GitHub, starting with branch master. For example the Config library [https://github.com/boostorg/config/commits/master can be seen here].
     16* 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.
     17* Use the dropdown box to change the history to point to the develop branch. [https://github.com/boostorg/config/commits/develop Config library can be seen here].
     18* 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, [https://github.com/boostorg/config/commit/67f6b934f161dc5da2039004986a14d9217afae4 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.
     19
     20Create a merge to that specific commit. Begin by changing your library to the master branch:
     21
     22{{{
     23git checkout master
     24}}}
     25
     26Now 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:
     27
     28{{{
     29git merge --no-ff --no-commit -s ours 67f6b934f161dc5da2039004986a14d9217afae4
     30}}}
     31
     32'''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:
     33
     34{{{
     35git commit -am "Create first merge point for Git"
     36git push
     37}}}
     38
     39Then navigate to your libraries history again, and check that the merge shows up, [https://github.com/boostorg/config/commits/master our config example is here].
     40You're now ready for "routine" merges to proceed as per Git Flow (or whatever other strategy you wish to use).