Merge or Cherry-Pick?

David Jarvie djarvie at
Wed Feb 2 13:25:49 GMT 2011

On Wed, February 2, 2011 11:38 am, John Tapsell wrote:
> On 2 February 2011 07:27, Dawit A <adawit at> wrote:
>> Ahh... I see. It is push everything upto that commit, not just push
>> that commit. Ouch! That is almost as much a hassle as the convoluted
>> method I am following now. Do not commit anything that is not ready to
>> be pushed into my own local branch. Use git stash to save the
>> uncommited changes before doing the pull --rebase and apply the
>> stashed changes after doing the push...
> And then one day you do  "git checkout ."  by mistake and lose all
> your local uncommitted changes that you just spent a week working on
> ..

I'd recommend maintaining a local 'master' branch which always mirrors the
remote repository. Never do development in your local 'master' branch -
always do your work in other local branches, and only merge/cherry-pick
changes from them into the local 'master' once you are ready to push to
the remote. That way, your local master always mirrors the remote, and you
can choose exactly when and which commits to push.

David Jarvie.
KDE developer.
KAlarm author -

More information about the kde-core-devel mailing list