Use git format-patch to slice out the partparts of the commit(s) you care about and git am to apply it to another branch
git format-patch <sha>develop...branch-with-file-commits -- path/to/file git checkout other-branch git am *.patch Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack Internal Use git format-patch to slice out the partparts of the commit(s) you care about and git am to apply it to another branch
git format-patch <sha>develop...branch-with-file-commits -- path/to/file git checkout other-branch git am *.patch Use git format-patch to slice out the part of the commit you care about and git am to apply it to another branch
git format-patch <sha> -- path/to/file git checkout other-branch git am *.patch Use git format-patch to slice out the parts of the commit(s) you care about and git am to apply it to another branch
git format-patch develop...branch-with-file-commits -- path/to/file git checkout other-branch git am *.patch