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 922907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:06:27+00:00 2026-05-15T19:06:27+00:00

When using hg branch FeatureBranchName and publishing it to a central repo that is

  • 0

When using hg branch FeatureBranchName and publishing it to a central repo that is shared amongst developers, is there a way to eventually close the FeatureBranchName when its development has officially been merged with the default branch?

It would also be helpful if the FeatureBranchName was not visible when performing a hg branches command.

  • 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-05-15T19:06:27+00:00Added an answer on May 15, 2026 at 7:06 pm
    hg commit --close-branch
    

    should be enough to mark a branch close. (see hg commit)

    --close-branch
    

    mark a branch as closed, hiding it from the branch list.

    See also this thread:

    My expectation is that I close a branch because this line of development has come to a dead end, and I don’t want to be bothered with it any more.
    Therefore, when a branch has been closed I shouldn’t see it (in branches, heads, log, for instance) unless I explicitly ask to see closed branches.

    I should note that I expect a closed branch to remain in the repository;
    it may be useful in the future, and the commit --close-branch message
    should at least explain why the branch was closed.
    Pruning branches is another thing altogether.


    Note: that “closing branch” business is one aspect seen as missing in Git, when compared to Mercurial:

    Branches in git are, we’re always told, ephemeral things to be used and thrown away, and so far as I know git doesn’t have a way to indicate to your colleagues that you’re done with a branch;
    the only way to do this is to delete it, or to hope they see the final merge commit and understand that the branch is closed to further development.

    [In Mercurial] When you’re done with a branch, however, you cannot delete it from the repository; instead, you issue a commit which closes the branch, and Mercurial notes that the branch is closed. It’ll remain a permanent part of your repository history.

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

Sidebar

Related Questions

I'm using git. I have a branch, apifixes , that was branched from master
Is there any way to modify central repository's configuration to disallow any remote pushing
There is a small topic branch that I'd like to apply on top of
Is there a quick way to merge the current working branch into the master
When I go to commit changes to a branch using, git commit -a vim
I am trying to create a new branch using the API, and have used
Using Eclipse/Subversive I commanded it to delete a branch of mine. Unfortunately it also
I was accidently using the gh-pages branch so now it has become the most
Using git , if I make git branch --all I can see all remotes
I'm currently using a github repository with a single branch, based of a master

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.