Skip to content
GitLab
Menu
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
2d341bc2
Commit
2d341bc2
authored
Jun 30, 2020
by
Hugo Buddelmeijer
Browse files
Add initial setup instructions.
parent
a261f3f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
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.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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