Using Git directly with Overleaf

Overleaf overs Git connection for free and paid repos. The Git repo URL is given from the Overleaf project, under Menu → Sync → Git. The Git URL is a long hexadecimal number. As usual with Git, clone to a human-friendly directory name like:

git clone<hash> ieee_paper1

store Overleaf username for Git

To avoid having to constantly type your username for (or any other Git HTTPS connection), add to ~/.gitconfig file:

[credential ""]
    username = your@email.address

Use the same email address you use to login to Overleaf. Depending on your Overleaf project settings, you may need to type the Overleaf password for git push to Overleaf.

repo-specific Git pre-commit hooks

If you use Git pre-commit hooks, these may be bothersome when uploading. To disable Git pre-commit hooks for a single repo, from the repo directory, type:

git config core.hooksPath " "

Git HTTPS credential cache

Git can use operating-system specific credential cache mechanisms–here are a couple for Linux vs. Windows.


Optionally, set a Git credential cache to avoid typing the password for Git HTTPS push each time. The command below remembers the Git HTTPS password for 300 seconds (5 minutes).

git config --global credential.helper 'cache --timeout=300'

The Git credential cache is for HTTPS Git credentials. SSH credential caching is configured separately with SSH, and is not affected by this Git cache setting.


Consider Microsoft Git Credential Manager.