Overleaf has its own built-in Git repository; however, to stay in compliance with IT@DU requirements it is recommended to utilize CS provided GitLab server at https://git.cs.du.edu.

Here is how to set up your Overleaf project with the CS GitLab server:

1. In your Overleaf Project, upper left Menu click “Git” and copy your project Git URL from the pop-up window.

2. On your local machine create a directory, for example, “Overleaf”.

3. Move to the new directory and clone your Overleaf repository:

git clone https://git.overleaf.com/6160e330dfdc585ebed91f23 my_project

4. Check your current Overleaf repository:

git remote -v
origin https://git.overleaf.com/6160e330dfdc585ebed91f23 (fetch)
origin https://git.overleaf.com/6160e330dfdc585ebed91f23 (push)

5. Go to https://git.cs.du.edu and create a new repository “Research”. Do not create .gitignore, README, or LICENSE files.

6. Connect your GitLab as origin:

git remote add gitlab https://git.cs.du.edu/aroudik/Research
git remote set-url origin --add --push https://git.overleaf.com/6160e330dfdc585ebed91f23
git remote set-url origin --add --push https://git.cs.du.edu/aroudik/Research

7. Verify Git remote setup

git remote -v
gitlab https://git.cs.du.edu/aroudik/Research (fetch)
gitlab https://git.cs.du.edu/aroudik/Research (push)
origin https://git.overleaf.com/6160e330dfdc585ebed91f23 (fetch)
origin https://git.overleaf.com/6160e330dfdc585ebed91f23 (push)
origin https://git.cs.du.edu/aroudik/Research (push)

8. Once it is done you are able to do the following:

git push  - push local changes to GitLab and Overleaf simultaneously 
git push gitlab - push local changes to CS GitLab only
git push origin - push local changes to Overleaf only
git pull - pull from Overleaf