<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Stephane,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I like it </span><span style='font-size:11.0pt;font-family:Wingdings;
color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>  right up until line 3<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal style='margin-left:5.15pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>git co mywork</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>....</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git add XXX</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git commit<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>my stuff isn’t finished yet. I don’t want to </span><b><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>commit</span></b><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> it.
I don’t want my log cluttered up with commits ‘every day’ of
stuff I haven’t finished. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If I have a working branch and I commit every day, that’s
ok, but when I merge these daily changes into a published branch, either my “PublishedWork”
or “KitwareMaster” – then I want the log to show a single
commit with “Lovely feature X added” and not the daily
mini-commits.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>From my tests so far, when I merge branches, all those
mini-commit logs are carried over and you see them in the “PublishedWork”
local master/whatever branch. <b>Am I wrong here?</b><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’m sure you know what you’re talking about, but I’m
still confused.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>JB<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Stephane PLOIX
[mailto:stephane.ploix@edf.fr] <br>
<b>Sent:</b> 28 April 2010 10:37<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> vtk-developers@vtk.org<br>
<b>Subject:</b> RE [vtk-developers] Stupid git question #2<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi John,</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git makes it
possible to use several kind of workflows, so I can propose one but others
might have other ones.</span> <br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I try to follow
the workflow described here :</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>http://www.kernel.org/pub/software/scm/git/docs/v1.7.1/gitworkflows.html<br>
</span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>The idea is to
use the branch and merge mechanism of git as much as possible : </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>you will always
have the "master" branch which is following the official vtk. NEVER
merge anything of your own in this branch, this one will only be used for
pulling from origin.</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>for each topic
you want to work on, create a branch (called "mywork" here). This
branch can be published.</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>and create an
integration branch (called "next" here). This one is a throw-away
branch from which you should never base any work. It is used to test merging
the master and the topic(s) branches and its history can be rewritten anytime.</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>The workflow is
then :</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'># do some work
on mywork</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git co mywork</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>....</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git add XXX</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git commit</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'># update master</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git co master </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git pull</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>now if you want
to test if your branch and the master branch are compatible, try a merge into
next : </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git co next</span>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git merge
master</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git merge
mywork<br>
</span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>in the last two
commands, you might have conflicts to resolve by hand.</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>If you do not
want to always resolve the same conflicts again and again, enable the rerere
option in git. This way, git will remember how your resolved a given confict,
and will apply the same resolution if it sees the same confict.</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>(see
http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html)</span> <br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>When you want
to push your work, you can either push the mywork branch to origin/master. In
this case, you might have a lot of conflicts to resolve, especially if you did
not enable rerere.</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>A better way is
to create a branch specifically for pushing : mywork-push. This one is branched
from master</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git co master </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git pull # to
be sure you are up to date on master</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git co -b
mywork-push</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git merge
mywork # this is when the conflicts might arise</span> <br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>this is
basically the equivalent of rebasing your work on master, but since your mywork
branch may have been published, it is a very bad idea to modify its history.</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Then you can
push : </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git push
origin/master</span> <br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>As I said, git
allows many workflows, so do not take this as the only possible one. </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>For instance,
you could rebase your topic branches on master each time you pull master, but
this does not enables you to publish your topic branches. </span><br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Yet another
possibility is to periodically merge master into mywork, but this way, the
history of mywork is cluttered with all the merge commits, and you cannot
rebase mywork on master anymore.</span> <br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Best</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Stephane</span>
<br>
<br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>PS : I used co
as an alias for checkout above. To have the same behavior, do :</span> <br>
<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>git config
--global alias.co checkout</span><o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0>
 <tr>
  <td rowspan=2 valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><img
  width=110 height=60 id="_x0000_i1025" src="cid:image001.gif@01CAE6C9.94E60D00"><span
  style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p>
  </td>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'> </span>
  <o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><b><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#FF8100'>Stephane PLOIX<br>
  Pilote Opérationnel - Visualisation scientifique</span></b><span
  style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#0062E1'><br>
  EDF - R&D<br>
  SINETICS<br>
  1, Av du Général de Gaulle<br>
  92140 Clamart<br>
  </span><br>
  <b><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#0062E1'>stephane.ploix@edf.fr</span></b>
  <br>
  <span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#0062E1'>Tél.
  : +33 (0) 1 47 65 51 10</span> <o:p></o:p></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><img
  width=110 height=30 id="_x0000_i1026" src="cid:image002.gif@01CAE6C9.94E60D00"><span
  style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p>
  </td>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
  color:#0062E1'>Un geste simple pour l'environnement, n'imprimez ce message
  que si vous en avez l'utilité.</span><o:p></o:p></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br>
<br>
<o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%'>
 <tr>
  <td width="40%" valign=top style='width:40.0%;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><b><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>biddisco@cscs.ch</span></b><span
  style='font-size:7.5pt;font-family:"Arial","sans-serif"'> </span><br>
  <span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Envoyé par :
  vtk-developers-bounces@vtk.org</span> <o:p></o:p></p>
  <p><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>28/04/2010
  09:15</span> <o:p></o:p></p>
  </td>
  <td width="59%" valign=top style='width:59.0%;padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellpadding=0 width="100%"
   style='width:100.0%'>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><span
    style='font-size:7.5pt;font-family:"Arial","sans-serif"'>A</span><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'></td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><span
    style='font-size:7.5pt;font-family:"Arial","sans-serif"'>cc</span><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>vtk-developers@vtk.org</span>
    <o:p></o:p></p>
    </td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><span
    style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Objet</span><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>[vtk-developers]
    Stupid git question #2</span><o:p></o:p></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><o:p> </o:p></p>
  <table class=MsoNormalTable border=0 cellpadding=0>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'></td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'></td>
   </tr>
  </table>
  </td>
 </tr>
</table>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br>
<br>
<tt><span style='font-size:10.0pt'>OK, I still don't have my submodule stuff
working, but that's ok, I know that eventually I'll find out how to wipe all my
work and lose everything .... however, in the meantime.</span></tt><span
style='font-size:10.0pt;font-family:"Courier New"'><br>
<br>
<tt>git encourages you to commit things all the time. Even when you're not
ready.</tt><br>
<br>
<tt>If I pull from remote/origin so that I can keep up to date every day, it
likes me to commit my stuff first - or do a stash save, pull, apply, which is
nice and avoids the problem ... but</tt><br>
<br>
<tt>I commit "Started work on feature X" , pull, commit "Got
some stuff working", pull, commit "nearly there" etc etc</tt><br>
<br>
<tt>now after month of rubbish tiny commits, I finally have my useful
implementation on my branch, and I rebase and want to commit my overall changes
to the official repo, but I want to avoid all the daily commits which are
meaningless on their own, and instead commit my branch feature to the head
remote with a single "New implementation of algorithm X, uses Y,  and
Z other algorithms to do this and that and supports options blah"</tt><br>
<tt>How can you turn all the little commits into a proper one? - and not lose
all the synchronization of the repositories etc. (For example, I may make a
pull from somewhere else to get something important, and this pull needs to be
preserved in the log history of commits in the remote etc.)</tt><br>
<br>
<tt>I know I'm asking too much, but you can say rtfm (with a good link) if you
want.</tt><br>
<br>
<tt>JB</tt><br>
<br>
<br>
<tt>_______________________________________________</tt><br>
<tt>Powered by www.kitware.com</tt><br>
<br>
<tt>Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html</tt><br>
<br>
<tt>Follow this link to subscribe/unsubscribe:</tt><br>
<tt>http://www.vtk.org/mailman/listinfo/vtk-developers</tt><br>
<br>
</span><o:p></o:p></p>

<pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.<o:p></o:p></pre><pre>____________________________________________________<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>E-mail communication cannot be guaranteed to be timely secure, error or virus-free.<o:p></o:p></pre></div>

</div>

</body>

</html>