Add all files to a commit except a single file?

前端 未结 13 892
遇见更好的自我
遇见更好的自我 2020-11-28 17:03

I have a bunch of files in a changeset, but I want to specifically ignore a single modified file. Looks like this after git status:

# modified:          


        
13条回答
  •  日久生厌
    2020-11-28 17:47

    To keep the change in file but not to commit I did this

    git add .

    git reset -- main/dontcheckmein.txt

    git commit -m "commit message"

    to verify the file is excluded do

    git status

提交回复
热议问题