Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hugo Buddelmeijer
gitremotesync
Commits
bfad5f96
Commit
bfad5f96
authored
Jul 01, 2020
by
Hugo Buddelmeijer
Browse files
Add cron instructions
parent
404ddc9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
bfad5f96
...
...
@@ -60,17 +60,32 @@ First create a new blank project. Do not import a project. Choose 'git' in the
like https://git.overleaf.com/5efb2cbe8306d30001f4cba8.
```
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 remote rename origin gitlab
git config credential.helper store
git remote add overleaf https://git.overleaf.com/5efb2cbe8306d30001f4cba8
git fetch overleaf
git merge -X ours overleaf/master
git merge -X ours overleaf/master
--allow-unrelated-histories
git push overleaf master
git push gitlab master
```
The overleaf default main tex file is
`main.tex`
. You should remove that file
if the imported gitlab project uses a different main tex file.
### Setup from existing Overleaf repository
This is simpler, just create an empty project on GitLab (that is, do not
initialize with a readme), clone the Overleaf repository like usual, add
the GitLab remote and push there.
### Setup cron
The synchronization can be automated by a cronjob. E.g. to synchronize every
5 minutes:
```
shell_script
(crontab -l ; echo "*/5 * * * * cd $(pwd) && bash ../gitremotesync/synchronize.sh") | crontab -
```
The synchronization scripts only outputs something when changes are propagated,
so cron will only send an email when synchronization has occurred.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment