我向分段區域添加了文件更改,之後進行了一些其他更改並希望它們未被跟蹤,直到第一次更改未提交(請參閱下面的代碼)。Git提交了一些分階段的更改,忽略了未分配的
如果我有一個文件,可以通過簡單的git commit
來完成。但假設我有幾個不同的文件上演,其中一些不上演。當我指向文件列表git commit <files>
時,Git提交這些文件的當前內容,即未跟蹤的更改,忽略分段的更改。 但我想提交分階段的更改,忽略某些特定文件列表的未跟蹤。怎麼做?
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: f1
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: f1