On Jun 15, 4:00 am, David Aguilar <dav...@gmail.com> wrote:

> Use 'git add -p', git-gui or git-cola [1] to tease the changes
> apart into a separate commits.
> Since you're already on the current branch, you should do all
> of the commits for that branch first.
> Now you have duplicate commits in your-topic-branch.
> You can use rebase to fix that.
> git checkout your-topic-branch
> git rebase -i master

Thank you for such a detailed response! I wasn't familiar with git-
cherry-pick and git-rebase, so I've read manuals first. Now I believe
I can understand your idea.

One unclear moment. You say:
- changes intended for the current branch only should be commited
- changes intended for both current and master branches should be
commited second;
Why this order is important? Isn't cherry-pick able to pick any
commits in any order?

One more question: as explained in 'git help rebase' the duplicate
commits will be removed automatically by rebase engine. So, why do you
recommend to use -i mode and remove them by hands?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to