New Gitflow causes loss of data

Each time I try to add a new GitFlow action (e.g. to add a new feature or hotfix)  to my local git file in SourceTree the Head seems to revert back to some very old position, causing recent data to be lost. There doesn't seem to be a way to restore the lost data other than by using a TimeMachine backup.

What am I doing wrong?

1 answer

Gitflow always creates those branches from the "develop" branch (or whatever branch name you've configured gitflow to use in that position". If you've stopped updating that branch, it would cause what you're describing.


Thanks for the response - yes that does seem to be the case. Being new to GIT, how do I finish updating the "develop", without loosing it (I don't want to merge that branch) so that GITFlow attaches to the current Head.

I'm not sure what you're going for. You say you want to update develop, but you don't want to merge anything into develop? What does this mean? If you want to get more recent commits into develop, you'll need to merge. Is there a reason you don't want to do that?


I'm probably not used to the correct GIT terminology. I have a branch that is labelled "develop" that I was working on some time ago, but that has some incomplete code in it. I would like to return to complete this later.

Now, I would like to use Gitflow to add some new branches to the work I am currently doing but it keeps reverting to the "develop" branch as described earlier.

What do I need to do to get out of this loop?

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...

1,229 views 4 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