How to stage only part of a new file with git?

前端 未结 5 1893
猫巷女王i
猫巷女王i 2020-12-02 03:33

I love git add --interactive. It is now part of my daily workflow.

The problem seems that it does not work with untracked files. What I wan

5条回答
  •  情话喂你
    2020-12-02 04:29

    Just for the record of another possibility: I use

    git add -N file
    git add -p file
    

    And then you can stage hunks, or edit them in place.

提交回复
热议问题