Giacomo Lawrance Giacomo Lawrance - 11 months ago 65
Git Question

Making a branch from repo history?

I have a branch deep down in my repo, around 15 commits earlier. I'd like to make that into a branch. Any way I can do this?

Thanks.

Answer Source

Checkout the commit that you want to branch from then branch.

Get the commit hash from the log e.g. ab3213e

git checkout ab3213e
git checkout -b my_new_branch