Undo gitflow action

Hi,

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 votes
Accepted answer
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 Sign up to answer
Community showcase
Posted yesterday in United States

Topic Tuesday: What's your favorite topic?

Good morning All, Our goal is to get you into the habit of while enjoying your favorite morning drink you are checking the NOVA "space" for topics and comments. Your input is really needed and...

41 views 4 0
View post

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