On Fri, 2012-11-30 at 06:02 -0600, 1100110 wrote: > I have just been reading that for advice and find the --no-ff > comments > confusing. Can you explain that please? I see two contradicting > claims. > >
Well the comments say that --no-ff does not create a single commit of the merged in commits, but only create a merge commit. Which is right, but it suffices to preserve the merge information and what was merged. In a fast forward merge basically the following happens: ---*----*-----*-----*master You branch to my_branch and do a commit ---*----*-----*-----*master |----*mybranch If you merge mybranch into master now: ---*----*-----*-----*----*master/mybranch The information is now lost that the last commit actually came from mybranch, with --no-ff you get a merge commit, which is special because it has two parents: git merge --no-ff mybranch: ---*----*-----*-----*---- * master | / |----*mybranch You can now list the commits that came from mybranch with the following command: git log master^..master^2 or simply visually print the merge graph in the log messages: git log --graph