Commit a261f3f6 authored by Hugo Buddelmeijer's avatar Hugo Buddelmeijer
Browse files

Improve instructions

parent e5201646
# gitremotesync
Sync the master branches of the local repository and all remotes.
\ No newline at end of file
Sync the master branches of the local repository and all remotes.
E.g. running this in a git repository with these remotes, will synchronize
three repositories:
```shell script
$ git remote -v
github git@github.com:hugobuddel/testlatex2.git (fetch)
github git@github.com:hugobuddel/testlatex2.git (push)
gitlab git@gitlab.astro-wise.org:buddel/testlatex2.git (fetch)
gitlab git@gitlab.astro-wise.org:buddel/testlatex2.git (push)
overleaf https://git.overleaf.com/5ef9e60ebb7def000199c1c5 (fetch)
overleaf https://git.overleaf.com/5ef9e60ebb7def000199c1c5 (push)
```
These projects will be synchronized:
* https://www.overleaf.com/project/5ef9e60ebb7def000199c1c5
* https://gitlab.astro-wise.org/buddel/testlatex2
* https://github.com/hugobuddel/testlatex2
Any change to master of one of these projects will propagate to the others.
This will allow seamless collaboration through overleaf, github and/or gitlab.
Collaborators who prefer to use merge/pull requests can do so through gitlab
or github. These changes will seem like an extremely fast typer to the
collaborators that are using overleaf. Vice versa, overleaf users appear
as people who create many commits to the gitlab/github users.
To run this script, clone one of the repositories,
add the other remotes, then run the script.
```shell script
git clone git@gitlab.astro-wise.org:buddel/gitremotesync.git
git clone git@gitlab.astro-wise.org:buddel/testlatex2.git
cd testlatex2
git init
git remote rename origin gitlab
git remote add overleaf https://git.overleaf.com/5ef9e60ebb7def000199c1c5
git remote add github git@github.com:hugobuddel/testlatex2.git
bash ../gitremotesync/synchronize.sh
```
Two things that you need to do that are beyond the scope of this project:
* Cache your overleaf credentials, it is not possible to use SSH for overleaf.
* Run the script periodically, e.g. every minute or before and after each change
you want to make.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment