How do I connect an Overleaf project with a repo on GitHub, GitLab or BitBucket?
Contents
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
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists
- Errors
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Matrices
- Fractions and Binomials
- Aligning equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
Languages
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Indices
- Glossaries
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks
Formatting
- Lengths in LaTeX
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes
Fonts
Presentations
Commands
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Knitr
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class