git checkout -b child git commit git checkout master git commit git marge child Note: In Git version 2.23, a new command called git switch was introduced to eventually replace git checkout