Binding captures / holds private messages

I want some commits to be closed when clicked, so I want them to fall into one big commit on the far side. Locally, they must remain separated.

An example of use is, for example, working on a static blog. Project steps must be executed and tracked locally, but when I click, I only want to publish the released versions.

A decision will be made in git and / or mercury.

+4
source share
2 answers

The idea would be to make your commits in a separate branch, but before git merge --squash them in master (or in any other public branch that you intend to push), as this will lead to the creation of a large commit.
Then you press master on the remote repo.

See " In git, what is the difference between merge --squash and rebase ? "

+4
source

In Mercurial 2.1 and later, you can use phases to mark changes as β€œsecret”. This will mark all outgoing revisions as secret:

 $ hg phase -f --secret "outgoing()" 

The secret change set is not pushed out or does not spoil by default, so after this command there will be no outgoing change sets - if necessary, adjust the necessary changes in the list.

You also say that you want the changes to be as one big commit in the remote repository. To do this, you can use the histedit extension bundled with Mercurial 2.3 and later. Use the --keep flag --keep that it does not remove the original changes when they change.

+5
source

All Articles