replicación o duplicación de repositorios

replicar un repositorio (by mate)
# partiendo de un repositorio existente y uno recién creado
cp -r $PATH_REPO $PATH_REPO_NEW (habría que hacer un --bare antes?)
git remote -set-url origin $URL_REPO_NEW
git push --mirror origin

/vía: https://stackoverflow.com/questions/3959924/whats-the-difference-between-git-clone-mirror-and-git-clone-bare

git clone --mirror $URLgit clone --bare $URL && (cd $(basename $URL) && git remote add --mirror=fetch origin $URL)
github doc
git clone --bare $URL_REPO
cd $PATH_REPO
git push --mirror $URL_NEW_REPO (o cambiar origin y un git push --mirror ?)
  • tech/git/replica.txt
  • Darrera modificació: 20/10/2018 03:29
  • per mate