How to save intermidate states of a layout?

Hi all,
sometimes I’d like to save an intermediate state of my layout work.
I tried “save as” [name]_V01.kicad_pcb, but this creates a .kicat_pcb that is not relatetd to the schematic and project anymore.

The simplest way is just a simple “save”.

An elaborate way would be to put your project in GIT, which preserves the whole history (or at least the details you want)

An intermediate solution is to just exit KiCad, then zip the whole project and archive it.
If you maintain a small text file with notes (such as when and why you saved a particular version) Then that gets zipped also with inreasing versions. It’s simple and quite effective.

I do like what Git does and how it works, but for personal projects you get 60% of the functionality with 10% of the effort (if you have to learn Git just for this) I tried Git a bit, but went back to my zipped archives (copied to external devices as backup) I always prepend the date in the filenames in( format, which automatically results in directory listings appearing in order of creation.

The log file can help if you have many similar backups and want to decide which to throw away during a clean up action.

I always delete the fp-info-cache files from backups. It’s 3MB and contains no important data.
But be careful with what you trow away. Don’t throw away files if you do not know what it’s used for.

KiCad V5 can also make backups, and in KiCad-nighly V5.99 it creates a directory with backups in which multiple zipped versions of your project reside.

The schematic is usually small, so putting it also in the backups is not a biggie.

1 Like

If I need to have a state to be able to went back to it I just copy *.kicad_pcb file under different name.
Later of course you have to give it the right name back to get back to that state.

I like to include a date in the filename. My method is similar to that described by paulvdh:
I have a folder with project, schematic, and pcb files all with the same name/date. When I want to make a new version I copy the folder and rename the folder and contents with the new date. For me it is common for pcb revisions to associate with minor schematic revisions. Sometimes the pcb drives the schematic… Of course you can zip the older folders or delete any that you are sure are obsolete.

Hello, this is not very elaborate but I often copy the whole project directory with a new name with version and/or date included. The copied project will be accessible inside the different directory and I know, I can go back to exactly the old state.


I use the zip file as a reference, because it can not be changed (too) easily, and keeps the project together, which is easier for backups too.

1 Like

Thank you all for your ideas and thoughts!

Zipping the project with added notes will do for me, as @paulvdh described.
As mentioned before, I “saved as” the layout. Strange things happened: new files were created, the new mylayout.kicad_pcb turned to be “standalone”. Is there any use in this feature?

For all but the most trivial of designs, I put the project under version control. Sure, there is a learning curve but there are significant advantages - you can very easily see the history of changes and step back and forwards to particular points. You can easily branch off an alternative design. You can use graphical tools like kidiff to visually compare the changes between arbitrary commits.
Git has a reputation for being rather arcane - and it is, in my opinion at least, not the best vcs for this sort of work. I would recommend taking a look at Fossil which is a better fit to KiCad in many ways - you have a cross platform app as a single binary which includes helpful features such as a web interface, tech notes, bug tracking, wiki and a forum built in. I get a chronological history of every commit I make with some context and can immediately check this out.

One of the limitations of the date based systems outlined above is that they don’t provide any context - you have several files saved over a number of days and, unless you keep a separate change log, you have to check the contents of each to find the exact version you want.

1 Like

The added changelog is indeed quite important when using zip files.
Instead of “version numbers” I also use date strings in ISO8601 format on both the schematic and the PCB, and these correlate to the dates used for the backups.

kdiff is a good argument for using GIT.

Zip files are attractive for their simplicity, and you can directly use KiCad project manager / File / Archive Project to make a backup. I do have some mixed feelings about this function though, as it is unclear to me which files it backs up. I’ve had some extra info added to a project directory which did not get archived.

<…post deleted…>

If backing up a projectx, I would include a projectx.README.txt text file in the projectx directory. That would be my “change log”, whereby I would force my future self to remember the reason I saved this particular version of projectx.

Thank you for the reference to Fossil. I will take a look at it and see if I can tell whether or not it is useful.

Unfortunately kdiff is the name of another application which compares files, i.e. shows differences between them. This should be rather KiDiff or something like that to avoid problems.

Anyway, a diff program is a file difference finder and visualizer. It’s very important in version control systems because seeing the differences between commits is one the core features. In git and others it’s usually a text based tool which shows differences between two versions of a text file.

In programs where the edited thing is graphics, text based comparison is often meaningless. This kdiff does graphical comparison by letting the user compare two images visually.

I like this idea, mainly because I already use the month/day/year (YYYYMMDD) part of the date string to prefix filenames in order to explicitly remind my future self when I created certain text files.

I create a number of folders and just move from one to the next copying all the files. As mentioned above I keep a txt file in the project to keep track of what I’ve done.

This works for me because as a hobby I can afford the time to tweak the design. Say I have all connected then I want to rotate an IC.

KiDiff was my original pcb layout diff program that works with Git, Fossil and SVN repos. ( More recently, @leoheck and I collaborated on ‘kdiff’, a combined schematic and layout diff program which @paulvdh linked to earlier. I agree, in retrospect, ‘kdiff’ might not have been the best choice of name.

1 Like

[Off-Topic, Maybe]

Hey guys, I did not read the whole conversation. This may not be the toppic of the thread tho.

kdiff was just an experiment that worked really well actually. I think you can rename my kdiff script to something else. It won’t give you any problem.

I think, most of the “k*” tools were make for KDE window manager for Linux, as the “g*” ones were made for Gnome. But this is not the the rule, I think. It is more like developers humor than anything. So the original kdiff may fit this, and since I dont use KDE and its tools, this didn’t interfere with my tool on my system.

With that being said, since John and I was colaborating to make this new experiment/tool. And then then just started from his “KiDiff” name to something similar but shorter and lowercase since I am a fan of easy to use command line tools. Then I saw “kdiff” was a good choice, since the command line arguments for both tools were the same at that time. I just had to remove an “i” to toggle tools (since I was testing it a lot buy myself)

But of course, I am open to suggestions to name it since it is a working tool and since I am seeing many starting to use it too. And also because it works multi platforms.

So, if you guys have any suggestion, let me know.

1 Like

Thats true, for backup and transfer KiCads ZIP-function is very useful.

I use KDE in Debian linux. There is no kdiff in linux. I searched for it. Just diff, the command line tool.

Nowadays there exists kdiff3. Doing a google search reveals that kdiff is either a name of an older app, older version of the recent one, or just used as a shortcut without the number. Confusing anyway. (BTW, ‘3’ there probably refers to 3-way diff or merge, not to a version number.)

I use kdiff3 all the time on linux