gpt4 book ai didi

git clean 什么都不做

转载 作者:太空狗 更新时间:2023-10-29 14:13:14 25 4
gpt4 key购买 nike

我正在尝试清理我的工作树,但是,当我输入 git clean --force 时没有任何反应。

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)

packages/Microsoft.AspNet.WebPages.2.0.30506.0/
packages/Microsoft.Data.Edm.5.2.0/
packages/Microsoft.Data.OData.5.2.0/
packages/Microsoft.Net.Http.2.0.20710.0/
packages/Microsoft.Web.Infrastructure.1.0.0.0/

nothing added to commit but untracked files present (use "git add" to track)

$ git clean --force

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)

packages/Microsoft.AspNet.WebPages.2.0.30506.0/
packages/Microsoft.Data.Edm.5.2.0/
packages/Microsoft.Data.OData.5.2.0/
packages/Microsoft.Net.Http.2.0.20710.0/
packages/Microsoft.Web.Infrastructure.1.0.0.0/

nothing added to commit but untracked files present (use "git add" to track)

同样,git clean -i 也没有效果。

最佳答案

这些都是目录,要删除目录,您需要使用命令:

git clean -f -d

感谢this answer .

关于git clean 什么都不做,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26895537/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com