Merge commits filtering by author - Git -
git rebase --interactive some_commit~
gives me list of commits some_commit
till head
.
git log --author some_author --oneline some_commit..
gives me list of commits some_author
some_commit
till head
.
how rebase commits second list? deleting commits not some_author
.
update
i found way, step missing mind:
git cherry-pick commit1 commit2 commit3 ...
how commit1 commit2 commit3 ...
if output second command is:
commit1 message1 commit2 message2 commit3 message3
?
as you've found, cherry-pick
way this. can replace --oneline
--pretty=%h
in log command have list commit ids. you'll want add --reverse
commits listed first last, rather recent oldest usual. can entire thing in 1 command with:
git cherry-pick $(git log --pretty=%h --reverse --author some_author some_commit..)
Comments
Post a Comment