git status

  1. $ git status
  2. On branch master
  3. Initial commit
  4. Changes to be committed:
  5. (use "git rm --cached <file>..." to unstage)
  6. new file: LICENCE
  7. new file: README.md

liceencs 是协议

git rm —cached 撤销上一步操作

  1. 陈子昱@DESKTOP-EK95GDR MINGW64 /e/gitclong/1/gittest (master)
  2. $ git rm --cached LICENCE
  3. rm 'LICENCE'
  4. 陈子昱@DESKTOP-EK95GDR MINGW64 /e/gitclong/1/gittest (master)
  5. $ ls
  6. LICENCE README.md
  7. 陈子昱@DESKTOP-EK95GDR MINGW64 /e/gitclong/1/gittest (master)
  8. $ git status
  9. On branch master
  10. Initial commit
  11. Changes to be committed:
  12. (use "git rm --cached <file>..." to unstage)
  13. new file: README.md
  14. Untracked files:
  15. (use "git add <file>..." to include in what will be committed)
  16. LICENCE

提交记录git log

image.png
image.png

git reset

image.png
image.png
git reset id号