Answer the question
In order to leave comments, you need to log in
How to clone a git repository without a .git directory?
I have a starter package in my git for my projects. I would like to work in the following way:
Answer the question
In order to leave comments, you need to log in
Enough debauchery, dig out the stewardess.
You have already found the most correct solution - Fork the starter package as a repo for a new project.
As a result, in one move you get a new independent repo, with the same set of files.
If the soul forgive the strange and the stewardess does not want to dig out, you can simply transfer the repository to a new project like this:
# Клонируем исходный репозиторий без рабочего каталога (--bare)
git clone --bare https://github.com/exampleuser/old-repository.git
cd old-repository.git
# Делаем mirror-push(будут скопированы все ветки и тэги) в новый репозиторий
git push --mirror https://github.com/exampleuser/new-repository.git
cd ..
# Удаляем папку с репозиторием
rm -rf old-repository.git
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question