Can I commit only parts of my code using SVN or Mercurial?

前端 未结 6 1427
梦谈多话
梦谈多话 2021-02-01 02:11

I use Tortoise SVN usuallly, but I have been looking into Mercurial since it is a distributed revision control system.

What I am looking for, in both systems, is a tool

6条回答
  •  日久生厌
    2021-02-01 02:52

    I would recommend not working like this.

    If you have to sets of changes, set A which is ready to check in and set B which is not ready yet, how can you be sure that only checking in set A will not break your build/tests? You may miss some lines, forget about lines in a different file, or not realize a dependency that A has on B breaking the build for others.

    Your commits should be discreet atomic changes that don't break the build for you or others on you team. If you are partially committing a file you are greatly increasing the chances you will break the build for others without knowing about it until you've got some unhappy coworker knocking on your door.

    The big question is, why do you feel the need to work this way?

提交回复
热议问题