Rose Perrone
Rose Perrone

Reputation: 63506

Get a series of commits on a detached head onto a branch

I have five commits on a detached head. I can't --set-upstream, because I'm not on a branch. Do I need to checkout a fresh branch, and cherry pick and commit all five of them individually?

Upvotes: 1

Views: 58

Answers (1)

Zombo
Zombo

Reputation: 1

Rose, it looks like you can just make a new branch

If you want to keep them by creating a new branch, this may be a good time
to do so with:

 git branch new_branch_name <SHA of fifth commit>

Upvotes: 1

Related Questions