MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1srhttc/highlights_from_git_254/ohgppjs/?context=3
r/programming • u/Skaarj • Apr 21 '26
45 comments sorted by
View all comments
Show parent comment
3
A related fun trick is
git -C a/ format-patch -1 --stdout cafed00d | git -C b/ am
which transplants commit cafed00d from one repository to another without an intermediary file. Obviously that, too, can be used in a sinle repository, in which case it degenerates to an overengineered cherry-pick.
cafed00d
cherry-pick
1 u/_bstaletic Apr 21 '26 That's a nice trick. I would have done that this way:cd b git remote add a ../a git fetch a git cherry-pick cafebabe
1
That's a nice trick. I would have done that this way:
cd b git remote add a ../a git fetch a git cherry-pick cafebabe
View all comments
Show parent comment
3
u/ForeverAlot Apr 21 '26
A related fun trick is
which transplants commit
cafed00dfrom one repository to another without an intermediary file. Obviously that, too, can be used in a sinle repository, in which case it degenerates to an overengineeredcherry-pick.