1
submitted 9 months ago by melroy@kbin.melroy.org to c/til@kbin.melroy.org

When you want to cherry pick a specific commit from another remote, you do NOT need to manually copy files or fetch a patch. It's git after all...

So when I try to cherry pick a commit from Kbin and merge it back into Mbin in cases we want changes back in Mbin as well you can use git cherry-pick.

But first follow these steps below, which assumes you already have cloned Mbin repository locally and are in the working directory of Mbin (eg. main branch):

git remote add kbin https://codeberg.org/Kbin/kbin-core.git
git fetch kbin
git checkout -b call-it-what-you-want  # Creates a new local feature branch

# Now check the log on the other remote and other branch
git log kbin/develop

# Finally, cherry pick the commit you want, use the commit hash here
git cherry-pick  <commit_hash>

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 17 Oct 2023
1 points (100.0% liked)

Today I Learned

1 readers
1 users here now

Today I Learned (TIL). You learn something new every day; what did you learn today?

founded 1 year ago
MODERATORS