0

Is it possible to recover git commit from data that is received from git reflog ?

Example of the git reflog output.

eff9143 HEAD@{14}: merge develop: Fast-forward e3ad8f7 HEAD@{15}: checkout: moving from develop to master eff9143 HEAD@{16}: commit: Add Login view. Setting up project structure. e3ad8f7 HEAD@{17}: checkout: moving from master to develop e3ad8f7 HEAD@{18}: commit: Add LaunchScreen 
0

1 Answer 1

2

Of course.

Read all about it here: How to move HEAD back to a previous location? (Detached head)

What you can do is to create new branch or reset the current branch to your desired commit and than work on it.

# create new branch git checkout -b <name> <sha-1> # "move" the current branch to any given commit git reset HEAD --hard 

and again all is described in details in the above answer.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.