What is the fastest way to unstage parts of a new file in git?

前端 未结 4 1781
旧巷少年郎
旧巷少年郎 2021-02-12 10:36

When I want to split up a new file into several commits I can git add -N and then interactively stage lines using git gui. When I make a m

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-12 11:14

    Using fugitive you can easily do so. Just invoke the :Gdiff command and then stage and unstage whatever you want. You can even edit the index file directly. Of course, this solution requires you to be fairly comfortable with vim and vimdiff...

提交回复
热议问题