Commit 00740df9 authored by Hugo Buddelmeijer's avatar Hugo Buddelmeijer
Browse files

Merge branch '1-add-instructions-on-how-to-initially-setup-the-projects' into 'master'

Resolve "Add instructions on how to initially setup the projects"

Closes #1

See merge request !1
parents a261f3f6 2d341bc2
......@@ -44,3 +44,33 @@ 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.
## Initial setup
Overleaf does some strange things with git. E.g. it deletes all the history
when importing a project, but creates a history when creating a new project.
Therefore some special instructions need to be followed to initially setup
the linked projects.
### Setup from existing GitLab repository
First create a new blank project. Do not import a project. Choose 'git' in the
'Sync' menu and copy the url (but note the `git clone` part). It should look
like https://git.overleaf.com/5efb2cbe8306d30001f4cba8.
```shell script
git clone git@gitlab.astro-wise.org:buddel/testlatex2.git
cd testlatex2
git remote rename origin gitlab
git remote add overleaf https://git.overleaf.com/5efb2cbe8306d30001f4cba8
git fetch overleaf
git merge -X ours overleaf/master
git push overleaf master
git push gitlab master
```
### 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.
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