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

前端 未结 6 1435
梦谈多话
梦谈多话 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:54

    Yes, git allows you to do this. The git add command has a -p (or --patch) option that allows you to review your changes hunk-by-hunk, select which to stage (you can also refine the hunks or, edit the patches in place). You can also use the interactive mode to git-add (git add -i) and use the "p" option.

    Here's a screencast on interactive adding which also demonstrates the patch feature of git add.

提交回复
热议问题