Undo gitflow action


I am using sourcetree with gitflow for Xcode (iOS development). I thought I was ready to start a new release branch and so selected that option from gitflow menu. Then I realized that I am not ready yet, so I want to undo this action but don't know how to.

The simplest option would be to simply finish this release, but that would merge all my current changes from develop into master, but I don't want to do that yet, since I am not done with this release and I only want to merge into master when I am ready with the release, just as intended by gitflow.

The next option would be to switch my active branch back to develop and continue with the missing changes and then create a new release branch. However, then I still have the old release branch kicking around and I don't know how to get rid of it.

Thanks, Toby

1 answer

1 accepted

0 vote
Timothy Chin Community Champion Sep 02, 2013

I'm sure that you can just right click and delete the branch right?

It's unfortunately not quite that straightforward. Here are the choices when I right-click on the branch in question (it is the active branch):

However, if I make develop the active branch, then the context menu of the feature branch chnages to this:

So now, I can delete the branch. I am still wondering about gitflow. So far, I can of course finish the feature. Does the gitflow script keep a reference somewhere of active release branches, or does it simply check the structure to see if anything is called "release-" and offer choices accordingly? In the latter case it should be safe to simply delete.

The question is what ahppens to my commit history? I do have one commit to this branch. Will this not mess up the repository?

Hello, i deleted the branch and it looks like it works perfectly. I'm not sure what will happen when I push my changes to the server.

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

178 views 12 3
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot