I messed up with Git-flow... help!

Hey,

I made a local commit and tried pushing it to bitbucket. It didn't work so I started playing around.. I hit git-flow and hit the default option and OK.. Now all my code has reverted to the original! I've lost all my hour's work...

Is there a way to switch back to pre-git-flow??

2 answers

1 accepted

0 votes
Accepted answer

I got it back! I didn't stash it or anything...

I found the head ref. no of the old commit in one of the files in .git folder and manually changed the actual head to that code. And boom.

Whew. Moving to a mac is painful.

Ouch.

I hate to be the harbringer of bad news, but I think that your lost commit is hosed. Did you stash or anything before you did it?

I got it back! I didn't stash it or anything...

I found the head ref. no of the old commit in one of the files in .git folder and manually changed the actual head to that code. And boom.

Whew. Moving to a mac is painful.

Yay! Glad you got your stuff back.

I've been on a mac professionally for years now. After you get used to it... I swear I get a lot more work done than when I was on windows. Maybe it's just selection bias.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

834 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you