Git基础(四)
一、删除不再追踪的内容
➜ git_test git:(master) touch test_rm.md
➜ git_test git:(master) ✗ git add test_rm.md
➜ git_test git:(master) ✗ git commit -m "first commit"
[master (root-commit) cab6745] first commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test_rm.md
➜ git_test git:(master) git status
On branch master
nothing to commit, working tree clean
➜ git_test git:(master) ls
test_rm.md➜ git_test git:(master) rm test_rm.md
➜ git_test git:(master) ✗ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: test_rm.md
no changes added to commit (use "git add" and/or "git commit -a")二、挪动文件的位置或者为文件重命名
三、总结
Last updated