Is deleting feature branches from which pull requests originate ok?

Hi everyone,

we're currently evaluating Stash and have a question regarding our future workflow. We've adapted the git flow branching model a while ago and by default create many feature branches which we eventually merge into the develop branch. We'd like to use Stash pull requests to facilitate that merge. We'd also like to prune merged feature branches from the git repository to avoid cluttering the repository with "dead" branches on the server side. Here's my question: What happens if we delete a remote feature branch with `git push origin --delete <branchname>` if a pull request originated from that branch (that would be the case for most of them)? Is that a valid way to use Stash or do we need some sort of workaround?

Thanks in advance for your help!

Cheers,

Georg

1 answer

1 accepted

1 vote
Seb Ruiz Atlassian Team Jan 30, 2013

Hi Georg,

It's perfectly ok to delete your feature branches after merging pull requests. Your pull requests will stay intact as you expect them and we have ensured that they will not be garbage collected by Git.

Regards,

Seb

excellent - thanks for the quick reply!

Jason Hinch Atlassian Team Jan 31, 2013

Just to add to Seb's answer this is the workflow the Stash team uses to develop Stash.

@Jason: Is there a complete documentation on your workflow by any chance? I think this might help resolve other questions, as well.

We are planning to document our workflow in the next few weeks in a blog post and/or our documentation.

Great - looking forward to it

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,105 views 26 12
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