Re: Picking up multiple cherries at one go.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 24, 2010 at 09:47, Jozef Babjak <jozef.babjak@xxxxxxxxx> wrote:
> However, last days I needed to split a long multi-purpose branch into
> several topic branches. The branch was created as a result of 'general
> cleanup and refactoring', but at the end of day I realized that some
> well-defined parts can be identified there and so I wanted to extract
> them to dedicated branches. Thus, cherry-pick and rebase were my
> friend for couple of days. Everything goes well, but there was a
> repetitive task - cherry picking multiple commits. Sometimes the
> process failed, because cherry picking led to conflicts. ...

Try git rebase -i (interactive) next time. It does not exactly what your
script does, but ... You may like it.

> To simplify this task, I wrote the shell script attached at the end of this
> email.The script named git_cherries.sh reads commit IDs from stdin and
> cherry-picks those commits to current branch. Everything is done on an
> auxilliary branch, ...

You can commit without a branch (called "detached HEAD").
Try "git checkout HEAD^0", for example.
No need to invent new branch names (and risk collisions).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]