Others ⇒ Overleaf and git: how to check out old revisions
Overleaf and git: how to check out old revisions
I'm working on overleaf.com and I would like to compare the current text version to an earlier draft using latexdiff. Hence I want to use git to download my project from overleaf at two different revisions.
Cloning my project from overleaf to a local repository is no problem. My problem is that I am new to git and I cannot find a way to rewind the repository to an earlier reference. I tried labeling version on overleaf but the label do not seem to show up consistently in my local repository.
Any idea on how to approach this? Or a better place to ask this question? I realize that this is relates to git more than to latex - but it is very specific to overleaf and hence this forum seems a good place to find expertise…
best wishes
kai
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Overleaf and git: how to check out old revisions
git checkout <COMMIT> <FILE>
→ Git: checkout a single file from a specific commit. BTW: To switch back to HEAD afterwards simply use
git-restore
or git checkout HEAD <FILE>
. To see all the commits of a file, simply use git log <FILE>
.BTW: git-difftool allows to use another diff tool instead of the usual. There has to be a configuration for the tool. And there isn't any default configuration for latexdiff. But I've never examined if such a configuration can be made for latexdiff. Maybe git experts know more about it.

Overleaf and git: how to check out old revisions
Overleaf and git: how to check out old revisions
So my work-around will be to check out ZIP archives of the two versions that I want to compare.
best wishes
kai