Break up multiple changes into separate commits with git?

前端 未结 4 1313
鱼传尺愫
鱼传尺愫 2021-01-30 06:32

If I have made multiple sets of changes to a large file, is it possible to split those into separate commits using git?

4条回答
  •  长发绾君心
    2021-01-30 07:15

    Yes, you can -- use git add -i to select which hunks you want to stage for each commit. You can get documentation by running git help add and scrolling to "Interactive Mode".

提交回复
热议问题