Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to do something like "git add -p"?

 In git you can do "git add -p" and it walks you through the hunks in a diff and lets you choose which parts of pending changes in a file to add to commit.

Can you do this in RTC? I suspect the underlying architecture can handle it but I can't find a UI or 'scm' command for it.

In RTC this would be choosing what parts of files to add to commit before you package it up for deliver.

Example of "git add -p" in action: http://asciinema.org/a/6337

0 votes


Accepted answer

Permanent link
 If your changes to the file where contained in two separate change sets then you could deliver/commit the change set the has the changes you want.  RTC makes you evaluate and deliver "Change Sets" but is not good a cherry picking changes within a change set.  So,  you could have very granular change sets which gives you the ability to cherry pick "changes"  or your abstract your changes a little bit higher and lump them together in to discrete "change sets" and manage those.

If you have a change set the needs to be broken up/divided up.  You can do this but it gets complicated.  Basically, you take your one change set, then create a "patch" change set which removes the stuff you want out.  Together, the original change set and the patch change set make up the one change set you want to deliver minus the stuff your don't want.  Then you create a third change set and put back the stuff, you want, so it is in its own change set.

Change Set A - has changes 1,2,3
Patch Change Set - has -3
Change Set A + patch Change Set = has changes 1,2
Change set B you create - put changes 3

Christian Höltje selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,027
× 1,204
× 97

Question asked: Nov 11 '13, 12:20 p.m.

Question was seen: 4,617 times

Last updated: Dec 16 '13, 4:17 p.m.

Confirmation Cancel Confirm