Pruning Git branches

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pruning Git branches

Erick Erickson
Do we have any convention that would prevent removing branches that are associated with JIRAs that have been fixed?

There are something like 8 gradle branches that are leftovers from the initial attempts to move to Gradle, I’ll remove them in a day or two absent objections.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Pruning Git branches

Dawid Weiss-2

I think there is some value in keeping the history of commits on these branches. I'd tag the head commit on a branch meant to be removed and push
that tag to the repo so that it's preserved in history, then remove the branch. Something like:

git co origin/gradle-master 
git tag archived/gradle-master
git push origin archived/gradle-master
git push :gradle-master

Dawid

On Sat, Oct 10, 2020 at 4:28 PM Erick Erickson <[hidden email]> wrote:
Do we have any convention that would prevent removing branches that are associated with JIRAs that have been fixed?

There are something like 8 gradle branches that are leftovers from the initial attempts to move to Gradle, I’ll remove them in a day or two absent objections.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Pruning Git branches

Erick Erickson
That’s a good point. My goal here is to reduce the long list of branches that makes finding branches that are currently being worked on more difficult than it needs to be.

> On Oct 10, 2020, at 5:23 PM, Dawid Weiss <[hidden email]> wrote:
>
>
> I think there is some value in keeping the history of commits on these branches. I'd tag the head commit on a branch meant to be removed and push
> that tag to the repo so that it's preserved in history, then remove the branch. Something like:
>
> git co origin/gradle-master
> git tag archived/gradle-master
> git push origin archived/gradle-master
> git push :gradle-master
>
> Dawid
>
> On Sat, Oct 10, 2020 at 4:28 PM Erick Erickson <[hidden email]> wrote:
> Do we have any convention that would prevent removing branches that are associated with JIRAs that have been fixed?
>
> There are something like 8 gradle branches that are leftovers from the initial attempts to move to Gradle, I’ll remove them in a day or two absent objections.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Pruning Git branches

Dawid Weiss-2

If you turn them into tags with some prefix then I see no problem there - the commit history is preserved, the branch itself can be removed.

On Sat, Oct 10, 2020 at 11:54 PM Erick Erickson <[hidden email]> wrote:
That’s a good point. My goal here is to reduce the long list of branches that makes finding branches that are currently being worked on more difficult than it needs to be.

> On Oct 10, 2020, at 5:23 PM, Dawid Weiss <[hidden email]> wrote:
>
>
> I think there is some value in keeping the history of commits on these branches. I'd tag the head commit on a branch meant to be removed and push
> that tag to the repo so that it's preserved in history, then remove the branch. Something like:
>
> git co origin/gradle-master
> git tag archived/gradle-master
> git push origin archived/gradle-master
> git push :gradle-master
>
> Dawid
>
> On Sat, Oct 10, 2020 at 4:28 PM Erick Erickson <[hidden email]> wrote:
> Do we have any convention that would prevent removing branches that are associated with JIRAs that have been fixed?
>
> There are something like 8 gradle branches that are leftovers from the initial attempts to move to Gradle, I’ll remove them in a day or two absent objections.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]