What are the purpose of the bare git repositories in .repo/projects/ created by the Android repo script?

后端 未结 3 843
执笔经年
执笔经年 2021-02-10 07:02

The Android source is managed by repo. When syncing using repo, a directory called .repo/projects/ is created, which contains all the git repositories also checked

3条回答
  •  滥情空心
    2021-02-10 07:43

    Disclaimer: I'm far from an expert with Git.

    I think you're saying that when you checkout code you get two copies. One is the working copy (where you specified it should be copied to) and another is kept in .repo/projects. Assuming I have interpreted the question correctly, my best guess would be that the copy in .repo/projects is kept so that you can quickly do comparisons with and revert to the base revision that you checked out without having to go back to the server. I think it is quite common for VCSs to do that. SVN does it by putting a .svn folder in all of the folders of your working copy and putting the base revision files in them.

提交回复
热议问题