3

I don't have good knowledge of cherry-pick. Just need to clear that a cherry-pick command generate the different hash code of same commit in different branch? Actually I am cherry-picking the hash-code in different branch. And here I am noticing that it is generating different hash code of the existing commit. Is it the workflow of it or any issue is existin here?

Nitu Dhaka
  • 1,300
  • 3
  • 14
  • 29

1 Answers1

7

The commit hash is based not only on the content of the commit but also the time the commit was made. Since cherry-picking creates a new commit at the current time, it will generate a new hash code. This question explains what goes into the hash.

In general you shouldn't really care about the hash, though.

Community
  • 1
  • 1
Chris Hayes
  • 11,471
  • 4
  • 32
  • 47
  • Thanks @Chris for reminding me the fact regarding creating of hashcode. – Nitu Dhaka Dec 20 '13 at 07:15
  • 1
    And [in some ways] more importantly the id of the parent so even if you fix up the timestamps a cherry-picked commit will still have a different id. – CB Bailey Dec 20 '13 at 08:27