然后再执行使用`mixed`模式回到第二次提交的位置,使用`git reset 73c9b49`或者`git reset --mixed 73c9b49`后,再使用`git status`查看状态,看到结果如下: On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>.....
如果现在运行git status,我们会看到文件显示在 “Changes not staged for commit” 下面并被标记为红色,因为该条目在索引与工作目录之间存在不同。 接着我们运行git add来将它暂存到索引中。 此时,由于索引和 HEAD 不同,若运行git status的话就会看到 “Changes to be committed” 下的该文件变为绿色 ——也就是...
Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: src/main/java/com/example/learnspringboot/LearnspringbootApplication.java no changes added to commit (use "git add"...
(use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: Dockerfile no changes added to commit (use "git add" and/or "git commit -a") 这个例子显示 Dockerfile 已被更改。 2a. 把工作树(当前目录)恢...
如果现在运行git status,我们会看到文件显示在 “Changes not staged for commit,” 下面并被标记为红色,因为该条目在索引与工作目录之间存在不同。 接着我们运行git add来将它暂存到索引中。 此时,由于索引和 HEAD 不同,若运行git status的话就会看到 “Changes to be committed” 下的该文件变为绿色 ——也就...
(1)把最后的commit切回Changes to be committed状态,使用命令 gitreset--soft HEAD^ 注意:Windows系统需要在^符号后面两边加上引号,如: gitreset--soft HEAD"^" (2)把最后的commit切回Changes not staged for commit状态,使用命令 gitresetHEAD^ (3)把Changes to be committed状态切回Changes not staged for ...
如果现在运行git status,我们会看到文件显示在 “Changes not staged for commit,” 下面并被标记为红色,因为该条目在索引与工作目录之间存在不同。接着我们运行git add来将它暂存到索引中 此时,由于索引和 HEAD 不同,若运行git status的话就会看到 “Changes to be committed” 下的该文件变为绿色 ——也就是说...
Unstaged changes after reset: M CONTRIBUTING.md $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) renamed: README.md -> README Changes not staged for commit: (use "git add <file>..." to update what will be committed) ...
git reset HEAD^ (3)把Changes to be committed状态切回Changes not staged for commit状态,使用命令: </>code git reset HEAD <file>... 最后一条命令在git命令行也有提示,不需要记住。 在A状态 commit 后,又进行了一些编辑,这些编辑并不想全部保存 commit 上去。这个状态叫 C。后来一不小心,把C状态 comm...
如果现在运行git status,我们会看到文件显示在 “Changes not staged for commit” 下面并被标记为红色,因为该条目在索引与工作目录之间存在不同。 接着我们运行git add来将它暂存到索引中。 此时,由于索引和 HEAD 不同,若运行git status的话就会看到 “Changes to be committed” 下的该文件变为绿色 ——也就是...