Re: git merge and cherry-pick and duplicated commits?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: skillzero
Date: Tuesday, January 13, 2009 - 11:21 pm

On Tue, Jan 13, 2009 at 9:31 PM, Brian Gernhardt
<benji@silverinsanity.com> wrote:


That's what I was somewhat disappointed by. Even though the result of
the commit had a different hash, I assumed git would keep some kind of
internal per-commit hash so it could tell later that two commits were
the same and not re-apply them.


The problem is, by the time I wanted to do the cherry-pick, I had
already committed other stuff to the branch. I tried doing 'git rebase
master branch' when on master and it just applied all the stuff from
master to branch.

Is there any way to apply a commit to 2 different branches (which have
diverged) in a way that git will remember so that when the 2 branches
merge later, it won't result in duplicate commits? I find that I often
make changes that days or weeks later find out that some other branch
needs that change and by then, there have been lots of commits to both
branches after the commit I want.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git merge and cherry-pick and duplicated commits?, skillzero, (Tue Jan 13, 7:40 pm)
Re: git merge and cherry-pick and duplicated commits?, Brian Gernhardt, (Tue Jan 13, 10:31 pm)
Re: git merge and cherry-pick and duplicated commits?, skillzero, (Tue Jan 13, 11:21 pm)
Re: git merge and cherry-pick and duplicated commits?, Johannes Sixt, (Wed Jan 14, 12:34 am)
Re: git merge and cherry-pick and duplicated commits?, Nanako Shiraishi, (Wed Jan 14, 1:31 am)
Re: git merge and cherry-pick and duplicated commits?, Johannes Sixt, (Wed Jan 14, 1:34 am)
Re: git merge and cherry-pick and duplicated commits?, Boaz Harrosh, (Wed Jan 14, 1:38 am)
Re: git merge and cherry-pick and duplicated commits?, Thomas Rast, (Wed Jan 14, 1:41 am)
Re: git merge and cherry-pick and duplicated commits?, Alex Riesen, (Wed Jan 14, 6:47 am)
Re: git merge and cherry-pick and duplicated commits?, Peter Baumann, (Wed Jan 14, 12:40 pm)
Re: git merge and cherry-pick and duplicated commits?, Junio C Hamano, (Wed Jan 14, 1:16 pm)
Re: git merge and cherry-pick and duplicated commits?, Markus Heidelberg, (Thu Jan 15, 4:09 pm)