-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This mirror repo was created to experiment with building VTK using GitHub actions to later use it as a dependency for another project, which uses VTK.
It is planned to work with official releases. At the moment of writing it is VTK-9.0.1.
The solution with --mirror
options is not nice (with remore.origin.mirro
set to true
)
for our usecase, because we want to add some extra branches. Solution with mirror
would
delete those branches on every "sync".
So we will have to always sepcify remote name, and --tags
and --all
options explicitly:
git clone --mirror https://gitlab.kitware.com/vtk/vtk.git vtk-mirror-for-github.git
cd vtk-mirror-for-github.git
git remote github-target https://github.com/DmitrySemikin/vtk-mirror.git
Now we can do
git fetch --prune
git push --all github-target
git push --tags github-target
We want to keep original branches from the official VTK repo intact, so if some conflict
shows up one can use --force
to overwrite local changes. I don't do it by default though
to have a possibility to save changes, if I still need them.
Mirroring is done using local repo like this:
git clone --mirror https://gitlab.kitware.com/vtk/vtk.git vtk-mirror-for-github.git
cd vtk-mirror-for-github.git
git remote set-url --push origin https://github.com/DmitrySemikin/vtk-mirror.git
Now we can do
git fetch --prune
git push
note, that the second, will automatically do git push --mirror
, because config has remote.origin.mirror
set to true
.
Instructions to mirror repo (also on github): https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository#mirroring-a-repository-in-another-location