@Fustiki_Scuria@mastodon.octofriends.garden
Post #2969784
2026-04-04 17:39 UTC
Here are two ways to import a commit from another repo (useful for importing templates)
apply:
git clone $OTHER_REPO_URL $OTHER_REPO
cd $OTHER_REPO
PATCH=$(realpath $(git format-patch $COMMIT^..$COMMIT))
cd $TARGET_REPO
git apply $PATCH
rm -rf $OTHER_REPO
cherry-pick:
cd $TARGET_REPO
git remote add other $OTHER_REPO_URL
git fetch other
git cherry-pick $COMMIT
git remote remove other
git gc
Which do you prefer?
Replies (0)
No replies.