Is it important to commit often (fine-grained changesets) to make merges easy?
Put differently: if I do infrequent commits, will Mercurial’s change record be lacking in data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
It’s a subtle distinction, but it isn’t the size of the commits that makes merging difficult, it’s how frequently you merge. Usually those correlate strongly with each other, but not always. For example, mercurial doesn’t care if you have 100 commits between merges or 1 big commit making the exact same change. Since you are merging from the same baseline, it effectively lumps those 100 commits together anyway. You will have the exact same number of conflicts that must be resolved manually.
The reason people suggest frequent merges is due to human limitations, not mercurial’s. Manually solving one merge conflict a day is a lot easier for a human than solving 100 day’s worth of conflicts all at once. Also, if you do it sooner, you can often completely avoid the later conflicts.