Executed merge command in wrong branch as undo

1

In my project I have 2 branch a work and a master, today after a long time I went up the project version, but at the time of running merge I ended up doing the wrong branch, I only realized after I had done the% When I opened the project with the old files, how can I undo this error?

The following is the command sequence I used:

Please help me, I'm really desperate with this my error: /

    
asked by anonymous 07.12.2015 / 13:49

1 answer

2

You can return this using the command:

git reset --hard commit_sha

There is another way

git reset --hard HEAD~6

You will return 6 commits.

See if that solves for you.

    
07.12.2015 / 14:04