When working with Git in Android Studio, the following problem occurred:
I would like to add a local repository, for example, on a flash drive. Ie, I want to clone a project from one local repository (on a PC) to another (on a flash drive) (for example, so that if something happens to a PC, you can take this project from a flash drive). In this case, then when making changes to the project, it is necessary that each of the repositories can be updated.
There is a lot of information on the Internet about how to do this for servers, i.e. clone the current repository with the project, for example, in GitHub.
And how to do it for a local repository? How can I clone a project from one local repository to another in Android Studio?
The contents of the config file in the .git folder that is created after cloning into the local repository:
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [remote "origin"] url = D:\\workDinar\\Android\\GitExperiment fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master 


git remote add backup path/to/repo, - Nick Volynkin ♦.git/configfile laid out in the question text, everything is in order with the repository. well, if android studio doesn’t dogit checkoutafter cloning, then this is just a “bug” of this program that should be reported to the developers. - aleksandr barakin