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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

648 views 0 4
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