This guide is indented for people who do not use Git and provides bare minimum to get started.
If you know Git you can read Overleaf manual.
Why Git for Overleaf:
In this tutorial we will show how those three things can be done.
In order to start download and install Git from this website.
We will use command line interface in this tutorial but you can use GUI client if you prefer.
Below we go through the three actions described above in the following sections.
git clone [copied link] [directory]
and run the command (git
must be in a search path for this command to succeed);directory
subdirectory.Later if you want to get current version of changes of repository to your local machine execute git pull
in command line in the directory directory
.
git pull
to synchronize your repository;git commit -am "describe your changes"
;git add [file name]
before running git commit
;git push
to send your local changes to Overleaf;This can be tricky. We will describe bare minimum here.
pull
or commit
and push
commands as described above before you start messing with history)git log
, you will get a list of entries starting with something like:> git log
commit 0d9fb31065757a9663e103e9f0131a131975daf1
Author: Bogumił Kamiński <bkamins@sgh.waw.pl>
Date: Thu Aug 3 22:16:35 2017 +0200
Trigger CI with fixed Documenter
commit 67f61c362fcf508ac26811060bf26edd9f08aacb
Author: Bogumił Kamiński <bkamins@sgh.waw.pl>
Date: Sun Jul 2 15:01:07 2017 +0200
fix SubString construction and test improvements
commit
) you want to get to in the log. It is usually enough to copy first 8 hexadecimal digits.git checkout [commit number]
and see the old version. Do not modify the files (if you want you can save them in a separate directory and modify them there)git checkout HEAD
to go back to the latest version you have (after this you are in synchronized with Overleaf again).Git provides a lot more functionality (you can edit older versions etc. but this is a more complex topic).
This is all you need to know to get started. For me it covers 99% of cases in daily work.
For more advanced Git features refer to its documentation or use GUI Client of GIT.