git: How to rebase all commits by one certain author into a separate branch?

前端 未结 2 788
花落未央
花落未央 2021-02-05 23:54

I\'m using some code for which no SCM is used+ and receive occasional updates in the form of all project files although only some of them have been changed only a bit

2条回答
  •  花落未央
    2021-02-06 00:41

    I recently did this for someone:

    git checkout -b other_work 
    git log --reverse --author=others --format=%H  | xargs -n 1 git cherry-pick
    

    Hope this helps

提交回复
热议问题