In Mercurial you can close a branch like this: hg commit --close-branch
, this means the the branch will not be listed anymore but will still exist, and can still be listed if you use hg branches --closed
I have learned that in Git generally branches are not kept, they disappear, specially when doing fast-forward merges.
So my question is: can you keep branches in git but in a way that you don't list them anymore?
Edit: Some additional context: In Mercurial branches are metadata, so each commit always knows it's branch. In Mercurial if you want to delete a branch, you strip the base branch revision. You can also rebase and end up with the same result as with Git. Mercurial Bookmarks are pointers, so they have the exact same behavior than a Git Branch.