Author Topic: Time Machine as "revision control substitute."  (Read 523 times)


  • Global Moderator
  • Storm
  • *****
  • Posts: 5632
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Time Machine as "revision control substitute."
« on: August 11, 2019, 10:30:20 pm »
Dear WeatherCat users who get their hands dirty with code from time to time,

I'm still struggling to get the website for my trusty wagon in truly presentable shape.  Recently, to my horror, I realized I had changed something that caused the history page to expand to greater width than the other pages.  I made a few "good guesses" as to what the problem was and - every guess was wrong!

So what to do?  I was reasonably sure when I first uploaded the page the error wasn't present.  Programmers use what is called "revision control."  Every change you make to your project is recorded.  So when something breaks, you can go back to the last time it wasn't broken and try to figure out what happened.

Alas, I don't know of any single-user system for version control.  However, I run Time Machine as Apple originally configured it.  So I could go back to the version of the file on any day.  Sure enough the problem was introduced by the edits I had done on August 2nd.  I recovered the files from August 1st and 2nd and then ran the UNIX diff command to find out exactly what I had changed.  It turned out I had improperly configured a table and that was the sort of the trouble.  Once I had identified the problem, it was easy to splice the correction into my current file.

Time Machine is obviously a life-saver if you need to restore your system.  However, you can use it in more mundane ways.  It doesn't take much more space to allow it to save all the changes to your files.  You don't change files all that often.  So this is a case were a tool that is useful for a critical need can be useful in  other more mundane, but nonetheless very helpful, ways.

Cheers, Edouard  [cheers1]


  • Storm
  • *****
  • Posts: 2586
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.5
Re: Time Machine as "revision control substitute."
« Reply #1 on: August 12, 2019, 12:52:39 am »
a tool that is useful for a critical need can be useful in other more mundane [tasks]
True! Of course, I long ago stopped using a cresent wrench as a hammer... [lol]
I've never used TM to restore any System file, nor even an app. But it has saved my 'bacon' quite often in restoring a file that had somehow developed bit rot! [banghead]

The Grand Poohbah

  • Gale
  • ****
  • Posts: 320
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Time Machine as "revision control substitute."
« Reply #2 on: August 12, 2019, 07:31:03 pm »
I've used Time Machine as a "revision control substitute" for years. Just before I make a major (and usually experimental) change to my app code, I do a "Back Up Now" on Time Machine. I date and log every code change in my Xcode project Notes file. If I discover that my revised code has taken me into a black hole, I "Enter Time Machine" and restore a copy of the pre-revision project folder. It works every time and has saved me a lot of grief.


  • Storm
  • *****
  • Posts: 3498
    • EW3808
    • Timber Lakes Utah
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS 10.15.7 | Sharx SCNC2900 Webcam | WeatherCat 3 | Supportive Wife
Re: Time Machine as "revision control substitute."
« Reply #3 on: August 21, 2019, 03:38:11 pm »
Nice write-up Edouard. After some great advice from Steve, and a ton of research on my own, I run Time Machine on a NAS (Drobo) for two iMacs and my trusty old MacBook Air (Gen 2). Time Machine has saved my bacon plenty of times and it is so easy to use. I switched TM to the Drobo after my third failed hard drive experience running TM on Apple Time Capsule. When that drive goes bad, you no longer have backups. On the Drobo, I'd have to lose two hard drives at the same time to lose Time Machine.