Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8128875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:04:35+00:00 2026-06-06T08:04:35+00:00

What are the current best practices with git branches that have been created to

  • 0

What are the current best practices with git branches that have been created to test out a solution to a bug and have not been merged because the review process show that they are wrong or there are better solutions to the problem?

An example. Project fizzbuzz has a bug report that reports a crash on empty fields.

  • I create a new branch handle-empty-fields and make two commit to that branch, “solving” the problem.
  • Then I submit that branch to the fizzbuzz project manager, linking it in the bug report.
  • Somebody finds an error in my fix, writes another patch and that patch get accepted.

Now the code in the handle-empty-fields my code is useless: it is not correct and cannot be applied any longer to the code, but it has been referenced in that bug report.

What should I do? Keep the branch? I will quickly end up with dozens of abandoned branch and git has no way to mark a branch as abandoned or closed. Remove the branch? But then people looking at that bug report will find it and get 404.

People are often suggested not to rebase their repositories because that will cause problems to other devs, especially downstream devs. What are the suggestions for feature or bug-fix branches?

Update: it looks like github never deletes the commits contained in pull requests. So, if you push your changes an turn them into a pull request, you can later delete the branch without losing any of your changes. Well, while github is still working ;).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:04:37+00:00Added an answer on June 6, 2026 at 8:04 am

    git update-ref refs/Attic/handle-empty-fields refs/heads/handle-empty-fields

    As an alternative to preserving dead branches in tags you could use a separate refs namespace. The upside is that the tag list stays uncluttered. A downside is moving from the porcelain to the plumbing level of git.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are the current best practices for testing database interaction with Symfony2? I have
I read at many tutorials that the current best practices to create a new
I'm looking for a 'model' website/application written in ASP.Net that illustrates current best-practices of
Anyone have any tips for best practices for mocking out facebook requests in functional
what is the best way to find out whether the current device supports a
Current Solution So I have something very similar to [HttpPost] public ActionResult Upload() {
Is there a general best-practices way of being notified when the current view controller
Following current best practices, what is the proper role for each of these? Based
What are the current best practices in the Rails world for displaying a calendar
Somehow I have the feeling that I am not the only one scratching my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.