gpt4 book ai didi

git - 如何将文件添加到 Git 中的最后一次提交?

转载 作者:IT王子 更新时间:2023-10-29 01:14:35 24 4
gpt4 key购买 nike

<分区>

有时在我提交之后,我发现我遗漏了一个文件,该文件也应该包含在提交中,但实际上没有。我经常再次犯:

git add the_left_out_file
git commit "include the file which should be added in the last commit"

我认为这样做可能不是一个好主意。我只想包含文件而不添加提交。像这样,

git add the_left_out_file
git add_staged_files_to_previous_commit

这可能吗?

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