[Insight-developers] some useful git commands for ITK

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Aug 3 10:53:54 EDT 2010


On Aug 2, 2010, at 12:18 PM, Brad King wrote:

> On 08/02/2010 11:05 AM, Gaëtan Lehmann wrote:
>> # one time configuration on each host
>> # to commit some changes and push it in the main repository
>> git add a_file  # -p can be handy to select only a part of the changes
>> git commit -s  # -a can be handy to commit everything without the need  
>> to run git add
>> git push  # actually publish the committed patch on itk.org
> 
> This is good for simulating our old CVS-based workflow and work
> directly on master.

Great suggestions in here. I just like to add a little bit to the work flow which I have been finding useful when you are breaking up your current changes in to a couple patches for the focused small commits.

#breaking up locate changes into focused commits
git add -p files/orDirectories
git stash save --keep-index # this will stash the changes which are not in the staging area (or added  or in the index )
make
test
git commit
git stash pop

It's important to build and test the patch to make sure it functional by itself and not dependent on you future commit.

Brad

> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100803/7b97ae97/attachment.htm>


More information about the Insight-developers mailing list