📜  git 只撤消一个块 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:27.114000             🧑  作者: Mango

代码示例1
Reset only chuncks from commit:
    git reset HEAD^ -- filename # (very important to specifiy the file, otherwise the commit is deleted…)
    git add -p -- filename. # To remove the lines you don’t want, replace the "-" symbol with " " (space) and delete the entire corresponding "+" line.