git checkout -b <branchname> <commit>

Creates and switches to a new branch from a specific commit

This command creates a new branch named <branchname> and checks it out. The new branch will be created based on the <commit> specified.

This allows you to go back in time to a specific commit and start a new branch from that point.

Welcome to GitExamples!

Sign in to enable bookmarking, reminders, progress-tracking and more...