Squashing makes sense if you have a really ratty bunch of checkins with
work-in-progress checkins etc., but unless it's a trivial topic branch I
would still typically make the final set of commits into a few logical
steps.

It costs pretty much nothing to leave old topic branches around (but a few
thousand "nothings" can add up :-)).

Once you've merged a topic branch you can safely delete the branch with no
harm (apart from losing the branch itself).

As Gergely says it depends on your workflow.

For example let's say you are using some fault tracking database (eg.
trac). It often makes sense to do the fix on a topic branch  (eg.
fix-trac-1234). If you leave the branch in place after merging it you can
then refer to the branch in the trac notes and see what fixes were used to
fix the bug (and reopen the bug if it needs another kick).

-- Charles







On Wed, Jul 20, 2016 at 5:29 PM, Gergely Polonkai <gerg...@polonkai.eu>
wrote:

> Hello,
>
> that, again, depends on your workflow. For one project, I
> interactive-rebase my feature branches often, and merge them into master
> when they are finished; after that, they can live forever in the repo, and
> if the feature needs a fix or change, I can check them out. For another
> project, I squash-commit the feature branch then delete it. In a third one
> I squash and don't delete. You decide :)
>
> Best,
> Gergely
>
> On Jul 20, 2016 05:55, "Michael" <keybou...@gmail.com> wrote:
>
>> Lets say I've got a topic branch. I've made a bunch of commits. It's
>> messy. But it's done.
>>
>> As I understand it, best practice is to do a squash commit of the whole
>> thing onto the parent branch (develop or master, depending on workflow).
>> And I can do that.
>>
>> What do I do with the leftover? I thought I could tag it as "closed", but
>> I can't use the same tag more than once. What's the best way to mark it as
>> done, or should I just delete the branch label and let it be garbage
>> collected/deleted?
>>
>> ---
>> Entertaining minecraft videos
>> http://YouTube.com/keybounce
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Git for human beings" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to git-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to