Skip to content

Using Overleaf with GitHub

You can configure your Overleaf project to sync directly with a repository on GitHub, or you can use raw git access as described below.

To sync your project directly with GitHub, open your project, go to the Menu in the top left, and choose GitHub from the Sync section. Then follow the prompts.

Raw Git Access to your Overleaf Projects

There are two main ways to use Overleaf with a project on GitHub, GitLab or BitBucket using our raw git access feature: add your Overleaf project as a remote, or add it as a submodule. The instructions below reference GitHub, but the process is the same GitLab, BitBucket or other hosted git providers.

Add an Overleaf Project as a Git Remote

If you have an repo on GitHub that you would like to create as a project on Overleaf, you can push it to Overleaf as a new project via git.

If you have a project on Overleaf that you want to push to GitHub, you can git clone the project from Overleaf and then follow GitHub's instructions to push the repo to GitHub.

Add an Overleaf Project as a Git Submodule

Each project on Overleaf gets its own git repo, but if you want to organise several such projects into one git repo on GitHub, you can add the repo for each project as a git submodule in the usual way. You can then push and pull each submodule repository to/from Overleaf individually and still have them collected together as submodules in the project on GitHub.

Migrating from Overleaf v1

On Overleaf v2, the git remote format has changed, compared to Overleaf v1. You can find the new git remote for your project by opening the project, going to the Menu in the top left, and choosing Git from the Sync section. You will need to move projects from Overleaf v1 to Overleaf v2 and update their git remotes and/or submodules in order to keep working on them.

Overleaf v2 also requires you to log in using your Overleaf email address and password, whereas v1 did not. Editing projects on Overleaf v2 now requires you to log in first.

Overleaf guides

LaTeX Basics


Figures and tables

References and Citations


Document structure





Field specific

Class files

Advanced TeX/LaTeX