Sorry, the last rebase command is missing: $ echo "echo \"Running post-checkout hook\"" > .git/hooks/post-checkout $ git checkout -b <branch1> <commit2> $ git rebase upstream/master --apply First, rewinding head to replay your work on top of it... Running post-checkout hook Applying: <commit1> Applying: <commit2> $ git checkout -b <branch2> <commit2> $ git rebase upstream/master --merge Successfully rebased and updated refs/heads/<branch2> > Le 2 avr. 2020 à 11:57, Philippe Blain <levraiphilippeblain@xxxxxxxxx> a écrit : > > $ echo "echo \"Running post-checkout hook\"" > .git/hooks/post-checkout > $ git checkout -b <branch1> <commit2> > $ git rebase upstream/master --apply > First, rewinding head to replay your work on top of it... > Running post-checkout hook > Applying: <commit1> > Applying: <commit2> > $ git checkout -b <branch2> <commit2> > Successfully rebased and updated refs/heads/<branch2>