mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-02-03 02:04:09 +08:00
对switch的设计和理解
This commit is contained in:
@@ -15,6 +15,8 @@ Git in Rust. 用 Rust 编写的简易 Git
|
||||
|
||||
- [x] branch
|
||||
- [ ] switch
|
||||
与checkout out不同,switch需要指明--detach,才能切换到一个commit,否则只能切换分支。
|
||||
同时为里简化实现,有任何未提交的修改,都不能切换分支。
|
||||
- [ ] restore
|
||||
将选中的文件/路径的文件恢复到--source 制定的版本,默认为 HEAD。不指定区域,默认只操作工作区。指定--staged,操作暂存区。同时指定--staged 和--worktree,操作暂存区和工作区。
|
||||
- 目录和通配符会去 suorce 中匹配。不会删除未跟踪的文件。
|
||||
|
||||
Reference in New Issue
Block a user