Earlier quoted context omitted.
I sometimes leave merged branches around for quite a while, because I squash them when I merge to master and sometimes when tracking down a bug the ability to bisect very handy.
What made you decide to squash when merging instead of leaving the commits in the history so you can always bisect?
Archiving Git branches as tags
31–40 of 49 posts
Re: Archiving Git branches as tags
#32On a related note, git supports incorporating custom commands via executables available in the `PATH` having the naming convention of: git- Where "command name" in this case would be `archive-branch` and could be defined thusly: #!/bin/sh # git-archive-branch git_branch="${1:-$(git branch --show-current)}" git co main && git tag archive/$git_branch $git_branch && git branch -D $git_branch It then could be invoked the…
Re: Archiving Git branches as tags
#33On a related note, git supports incorporating custom commands via executables available in the `PATH` having the naming convention of: git- Where "command name" in this case would be `archive-branch` and could be defined thusly: #!/bin/sh # git-archive-branch git_branch="${1:-$(git branch --show-current)}" git co main && git tag archive/$git_branch $git_branch && git branch -D $git_branch It then could be invoked the…
Re: Archiving Git branches as tags
#34How about just
# rename branch to archive/ prefix to indicate it is archived
git branch -m foo-branch archive/foo-branchRe: Archiving Git branches as tags
#35On a related note, git supports incorporating custom commands via executables available in the `PATH` having the naming convention of: git- Where "command name" in this case would be `archive-branch` and could be defined thusly: #!/bin/sh # git-archive-branch git_branch="${1:-$(git branch --show-current)}" git co main && git tag archive/$git_branch $git_branch && git branch -D $git_branch It then could be invoked the…
Why is this useful? Why would someone care about typing `git archive-branch` instead of `git-archive-branch`?
Re: Archiving Git branches as tags
#36I don't see the point of this. A git branch is already a kind of tag. How about just # rename branch to archive/ prefix to indicate it is archived git branch -m foo-branch archive/foo-branch
Re: Archiving Git branches as tags
#37Earlier quoted context omitted.
Hooks only keep honest people honest :) and an LLM will happily clobber a tag and skip hooks while the user just spams “accept”.
That's true for local hooks, but neither a dishonest person nor an LLM can bypass a pre-receive hook on the server (as long as they don't have admin access).
Re: Archiving Git branches as tags
#38Re: Archiving Git branches as tags
#39I don't see the point of this. A git branch is already a kind of tag. How about just # rename branch to archive/ prefix to indicate it is archived git branch -m foo-branch archive/foo-branch
Re: Archiving Git branches as tags
#40I don't see the point of this. A git branch is already a kind of tag. How about just # rename branch to archive/ prefix to indicate it is archived git branch -m foo-branch archive/foo-branch
Branches are expected to change, tags are not. Tags are also mildly harder to change. A tag seems more apt for an archived branch. So I sort of see where OP comes from.