gitgithubcherry-pick

Is it possible to cherry-pick a git commit without changing it?


Situation:

My current workaround is to manually git fetch their repo and then git reset --hard onto commit abcd. Afterward I can push my branch to my repo.

It would be especially nice, if I could update the branch from a GitHub PR without resorting to manually fetching and pushing just to add a single commit from a GitHub PR to my repo.


Solution

  • You can add their repo as an origin, fetch all commits, and use git merge --ff-only abcd.