gpt4 book ai didi

git - 您如何仅存储已添加的文件?

转载 作者:行者123 更新时间:2023-12-02 10:14:02 25 4
gpt4 key购买 nike

例如,git status给出以下内容:

Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

modified: app/src/[....]
modified: app/src/[....]
new file: app/src/[....]
deleted: app/src/[....]
modified: app/src/[....]
modified: test/unit/[....]
modified: test/unit/[....]
new file: test/unit/[....]
deleted: test/unit/[....]
modified: test/unit/[....]

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: test/unit/[....]

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

app/src/[....]/
app/src/[....]/
app/src/[....]/

(我已经空白的文件名)

我将如何存储我拥有的更改 git add ed(即“要提交的更改”,而不是未暂存的更改或未跟踪的文件)所以我可以将它们转移到另一个分支?

最佳答案

提交这些文件,然后重新提交。

关于git - 您如何仅存储已添加的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30359921/

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