Can "secret" be the Mercurial equivalent of assume unchanged/skip worktree?

291 Views Asked by At

Let's assume that I want to comment out the login verification or hardcode a password in an application, just for the personal convenience of logging in immediately while developing.

I don't want to ever commit this change and I am 100% sure that I am not going to modify the source file for other reasons. In git I would use skip-worktree. I've seen that in Mercurial offers a "secret" phase, but that is a completely new concept for me. Can I make this a "secret" commit and be sure it will never pop-up in the official repo?

1

There are 1 best solutions below

1
On

"Secret" phase treat whole changeset as secret (all commits from your confidential to tip and all next made). So you will not be able to push them to public server. You'll have to rebase them to "non-secret" branch before push, but it is annoying and vulnerable to a fateful mistake.