Is it good to commit files often if using Mercurial or Git?

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-06-10T18:47:32Z Indexed on 2010/06/10 18:52 UTC
Read the original article Hit count: 229

Filed under:
|
|

It seems that it is suggested we can commit often to keep track of intermediate changes of code we wrote… such as on hginit.com, when using Mercurial or Git.

However, let's say if we work on a project, and we commit files often. Now for one reason or another, the manager wants part of the feature to go out, so we need to do a push, but I heard that on Mercurial or Git, there is no way to push individual files or a folder… either everything committed gets pushed or nothing get pushed. So we either have to revert all those files we don't want to push, or we just never should commit until before we push -- right after commit, we push?

© Stack Overflow or respective owner

Related posts about git

Related posts about mercurial