Giacomo Lawrance Giacomo Lawrance - 1 year ago 81
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?


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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download