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

  • Home
  • SEARCH
  • 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 6476807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:52:15+00:00 2026-05-25T06:52:15+00:00

according to Mercurial’s commit help message: If a list of files is omitted, all

  • 0

according to Mercurial’s commit help message:

If a list of files is omitted, all changes reported by "hg status" will be
committed.

Is there an easy way to change this behavior?

I’d like Mercurial not to commit any changes, unless the files are explicitly specified.

edit

I am on Linux and I am using the command line.

  • 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-25T06:52:15+00:00Added an answer on May 25, 2026 at 6:52 am

    This seems to do the trick:

    $ hg commit -X *  
    nothing changed
    

    It doesn’t do anything because all files are excluded, but if you give any files, those will be included.

    You could alias it:

    [alias]
    xcommit = commit -X *

    then:

    $ hg status
    M a
    M b
    $ hg xcommit -m 'no files specified'
    nothing changed
    $ hg xcommit -m 'picking a' a
    $ hg status
    M b
    

    Personally I wouldn’t want to get used to this type of workflow. It’s usually just as easy to:

    • work in smaller chunks so your changes reflect a single changeset
    • for the times when you forget and you’re on a coding spree, use something like hg record
    • for the really few times when the above two don’t fit, use -I/-X for that single commit
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to here , the C compiler will pad out values when writing a
According to the HttpListener reference , a call to HttpListener.GetContext will block until it
According to the manual , git dcommit will create a revision in SVN for
I believe my most recent commit in Mercurial has become corrupt. I cannot commit
According to the docs , all ajax pages fetched are removed from the DOM
According to some STL documentation I found, inserting or deleting elements in an std::list
According to the gcc docs , memcmp is not an intrinsic function of GCC.
According to Apple's description, the aurioTouch sample app is suppose to get the audio
According to http://lipas.uwasa.fi/~ts/info/proctips.html#orrules , you can make basic or rules in .procmailrc with something
According to W3C standards, if you have a nillable element with a nil value,

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.