<div dir="ltr">Great! Thanks,<div>Nick</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Nicholas K. Sauter, Ph. D.<br>Computer Staff Scientist, Molecular Biophysics and Integrated Bioimaging Division<div>Lawrence Berkeley National Laboratory<br>1 Cyclotron Rd., Bldg. 33R0345<br>Berkeley, CA 94720<br>(510) 486-5713<br></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jan 12, 2016 at 12:45 PM, Luc Bourhis <span dir="ltr">&lt;<a href="mailto:luc_j_bourhis@mac.com" target="_blank">luc_j_bourhis@mac.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; We discussed your &quot;git add -p&quot; suggestion in our group meeting just now, and nobody here could explain why the command would be &quot;git add&quot; rather than &quot;git commit&quot;.  So if you want to commit all of your changes at once you would use &quot;git commit&quot;, but not &quot;git add&quot;?  Or is &quot;git add&quot; mandatory anytime you want to commit any change and it is only the &quot;-p&quot; flag that is optional?<br>
<br>
</span>git has the concept of the staging area which svn does not have:<br>
<br>
- git add some_file.py will add the whole file to the staging area<br>
- git add -p will let you select which chunks go into the staging area<br>
<br>
and you can mix and match those with different files at your heart content. When the staging area contains what you want in your commit, then you just do<br>
<br>
git commit -m ‘your commit message’<br>
<br>
and everything in the staging area will end up in that new commit.<br>
<br>
But sometimes, you just want to commit a single file and then you can do the shortcut:<br>
<br>
git commit -m ‘message’ your_file.py<br>
<br>
which is equivalent to<br>
<br>
git add your_file.py<br>
<br>
followed by<br>
<br>
git commit -m ‘message’<br>
<br>
I hope this answers your question.<br>
<div class="HOEnZb"><div class="h5"><br>
Luc<br>
<br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</div></div></blockquote></div><br></div>