-1

I deleted a branch that i want to restore. I tried to recover it and the only thing i could find is a commit from git-log running: git log -p 4afa3abc4218b6251dea24c910eaced6af465d11. Also - it seems that this SHA appears only on my local mac (when my colleague run this git-log command he gets an error)

I can see the changes in the output and i would like to create a brand new branch from this git log output.

How can i easily do that?

1

1 Answer 1

2

Just check out the commit and create the branch.

git checkout 4afa3abc4218b6251dea24c910eaced6af465d11
git branch yourbranch
Sign up to request clarification or add additional context in comments.

1 Comment

Perhaps git checkout -b yourbranch 4afa3abc4218 so that you are on the branch and not in detached HEAD state.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.