Comment #15 on issue 2217 by asmeurer: Patches tutorial http://code.google.com/p/sympy/issues/detail?id=2217
Well, there are basically two ways to get up to date with a changed master, rebasing and merging. Rebasing is recommended for smaller branches, and is also the way to edit/squash commits (so you might as well do it if you are doing those too). For people who are new to git, we pretty much exclusively recommend rebasing for this reason.
For larger branches (like 20+ commits or so), there are some advantages to merging instead of rebasing. Rebasing reapplies each commit iteratively over master, and if the state of the files changed by that commit is different from when it was originally made, the commit will change. This means what you can end up getting commits that are broken, or commits that do not do what they say they do (because the changes have been "rebased out"). This can lead to confusion if someone in the future tries to test something by checking out commits from the history.
Merging keeps everything intact. The commits you make are exactly the same, down to the SHA1 hash, which means that if you checkout a commit from a merged branch, it is exactly the same as checking it out from a non-merged branch. What it does instead is create a single commit, the merge commit, that makes it so that the history is both master and your branch. This commit contains all merge conflict resolution information, which is another advantage of rebasing (all merge conflict resolutions when rebasing are "sifted" into the commits that caused them, making them invisible).
But I would recommend just putting the merge stuff as a footnote in the guide. Since the guide is aimed at new git users, they should be learning how to rebase. Also, git rebase has a very friendly interface (compared to git merge) that guides you through each action (editing commits, fixing merge conflicts, etc.). And while the merge conflicts resolutions will be hidden in the final result, they are easier to apply with git rebase because you only have to apply the resolution for one commit at a time, instead of the whole branch at once.
By the way, your command sequences seem to be correct for each of these. -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
