Skip to content

关于最后成果的功能 #15

Description

@callumyang

最后成果:
实现命令行交互,分支,回滚
命令行交互实现:
使用Scanner传送命令
分支功能实现:

  • 创建一个文件夹,文件夹命名为branch,文件夹中的每个文件是各个分支的信息(初始状态下,branch文件夹中有一个名为main的空文件)
  • 每新建一个分支,在branch文件夹中增加一个以该分支名命名的文件,每次commit将commit的key写入对应的分支文件中
  • 每次commit将其对应的分支名写入head文件中
    回滚功能:
    找到需要回滚的commit的key,然后回滚,再修改head

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions