What are the differences between git cherry-pick and git show | patch -p1? -


i ran situation git cherry-pick x have conflicts, created inserts (when verified git diff).

i re-ran git show x > my.patch, , did patch -p1 < my.patch on tree. got better results, conflicts, cleaner result.

what git special cherry-picks? use git 1.7.0.4.

edited: cleaner results, mean resulting tree matched lot more results of git show x, whereas git cherry-pick included lot more code.

when cherry-pick commit, commits result using metadata of commit, not diff represents - you'll original commit message , author. patch pipeline working tree contents want, you'll have commit yourself, git commit -c <original-commit> copy metadata cherry-pick have. cherry-pick has additional options helpful, , can accept multiple commits (perhaps specified rev-list range). patch doesn't support of that.

i'm not sure assertion result "cleaner". suggesting git applied diff differently patch did?


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -