Suppose I have created a *.tex file today.

I make some changes tomorrow and then some more after two days. I think, it's useful if there is a record of what I have added on particular day.

Is there a way to keep track of changes made to a *.tex file?

One stupid solution I can think of for this situation is to create new blank file every time you want to make changes and copy content of old file to this blank file.

Are there other ways to keep track of what has been done to a *.tex file?

I am more interested in keeping tack of changes and not interested in having access to the file everywhere. I am already using Dropbox for the purpose of accessing my files wherever I want. I am happy with the answers. Are there any ways other than git or something along same line?

  • 5
    use a source control system such as git or svn that is exactly what they do. Dec 17, 2019 at 17:21
  • 1
    for example the last 2256 edits to the latex sources are github.com/latex3/latex2e/commits/master Dec 17, 2019 at 17:23
  • By the way, svn is short for Subversion. This kind of software is known as VCS or RCS (version control system, revision control system).
    – frougon
    Dec 17, 2019 at 17:24
  • @David Thanks for your comment. I have no Idea about git or SVN. I heard these terms many times but don't understand much about it. Can you kindly make your comment as an answer and give some more details Dec 17, 2019 at 17:24
  • 3
    how to use git or svn is off topic as it is unrelated to tex, the systems apply to any text files they could be just .txt files or html pages or c programs etc. Dec 17, 2019 at 17:30

3 Answers 3


Use a source control system such as git or svn that is exactly what they do.

How to use such a system is off topic here and too long for an answer, but a popular system these days is github (all the latex base sources are on there)

github has lots of tutorials perhaps start with this


Note that you can use a source control system on your local machine but using a web based server such as github (bitbucket, sourceforge, gitlab, ... are similar sites) you not only get the benefit of being able to track (and possibly revert) all changes but get the benefit that all your revisions are stored off your machine, so if you leave your laptop on the bus, you still have your document and its history.

  • 2
    "popular system" => "popular hosting service for git-controlled software", or something alike. You can use git without hosting your code on-line, and you can use other service / servers too. Your answers makes it sound like git = github to me.
    – Clément
    Dec 17, 2019 at 17:38
  • Thanks for the link. I might take more time than people usually take to understand hoe to use git or svn. Dec 17, 2019 at 17:39
  • 1
    @Clément I explictly say that you can run the software locally but chose (here) to recommend a web hosted version and listed several non github sites? Dec 17, 2019 at 17:41
  • Also Mercurial. Dec 18, 2019 at 3:54
  • @Faheem No If you are using it already, ok but l would definitely recommend SVN or git for a beginer Dec 18, 2019 at 8:32

If you're using Dropbox, you are offered a basic instance of versioning resp. file history.

Under Windows simply right click on the file and choose History in the context menu. Goto the prefered timestamp and open it in any ASCII based editor, e.g. Notepad++.

If needed, you can diff current and earlier versions on the CLI.

  • This is what I want. :D I did not knew drop box keeps history (I knew I can go back to just previous one but did not knew I can go back to what I have done 10 days before)... I have trouble understanding "If needed, you can diff current and earlier versions on the CLI." Can you please explain.. Dec 20, 2019 at 3:49
  • @PraphullaKoushik it means, you can use the command line to compare your documents. btw: if the answer is acceptable to you, simply check it.
    – naphaneal
    Dec 20, 2019 at 20:18

Using a version control system needs time and effort. I'm earning my bred with writing letters and contracts and except for larger projects it is enough to

  1. include comments in the *.tex file about what I'm doing why and when
  2. and before I start a major rework of the file, I save the *.tex file with a new version number. My *.tex files usually are named like 191217-blabla-V1.tex. In this example I'd save it as *-V2.tex.
  • 1
    "Using a version control system needs time and effort.": I agree that learning how to use them costs a lot, but once you know how to use them, it takes literally no time to track the changes in a file.
    – Clément
    Dec 17, 2019 at 17:39
  • Do I have to create new copy every time when I want to make changes?? Dec 17, 2019 at 17:42
  • @PraphullaKoushik I usually make a new version every morning. During a day I keep track by leaving comments in the file.
    – Keks Dose
    Dec 17, 2019 at 17:52
  • @Clément If you are on one pc and you have a local cvs, maybe it is easy. But as soon as you have confidential content and you need encrypted syncs between two computers without a central server, things become messy.
    – Keks Dose
    Dec 17, 2019 at 17:56
  • @KeksDose You are right. I don't think that this is related to what OP was asking, though.
    – Clément
    Dec 17, 2019 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.