Skip to content

Instantly share code, notes, and snippets.

@superbit
Created June 26, 2017 19:27
Show Gist options
  • Save superbit/922158fe9108ce9c490aa42607f51e43 to your computer and use it in GitHub Desktop.
Save superbit/922158fe9108ce9c490aa42607f51e43 to your computer and use it in GitHub Desktop.
# Клонируем исходный репозиторий без рабочего каталога (--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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment