Skip to content

KiCad: add exclusion for V10's .history folder#4784

Open
hlord2000 wants to merge 1 commit intogithub:mainfrom
hlord2000:kicad/v10_history_dir
Open

KiCad: add exclusion for V10's .history folder#4784
hlord2000 wants to merge 1 commit intogithub:mainfrom
hlord2000:kicad/v10_history_dir

Conversation

@hlord2000
Copy link
Copy Markdown

@hlord2000 hlord2000 commented Jan 18, 2026

Signed-off-by: Helmut Lord kellyhlord@gmail.com

Reasons for making this change

KiCad V10 adds a ".history" folder for internal use.

Links to documentation supporting these rule changes

TODO

https://forum.kicad.info/t/history-folder/65861/4

Merge and Approval Steps

  • Confirm that you've read the contribution guidelines and ensured your PR aligns
  • Ensure CI is passing
  • Get a review and Approval from one of the maintainers

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
Copilot AI review requested due to automatic review settings January 18, 2026 02:58
@hlord2000 hlord2000 requested a review from a team as a code owner January 18, 2026 02:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for KiCad V10's new .history folder to the KiCad gitignore template. KiCad V10 introduces a .history folder for internal history tracking that should be excluded from version control.

Changes:

  • Added gitignore pattern for KiCad V10's .history folder

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread KiCad.gitignore
# Archived Backups (KiCad 6.0)
**/*-backups/*.zip

# Archived Backups (KiCad 10.0)
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment describes this as "Archived Backups" but based on the KiCad forum discussion linked in the PR, the .history folder is for internal history tracking, not archived backups. Consider updating the comment to more accurately describe this feature, such as "Internal history folder (KiCad 10.0)" or "History tracking folder (KiCad 10.0)".

Suggested change
# Archived Backups (KiCad 10.0)
# Internal history folder (KiCad 10.0)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say "Local History (KiCad 10.0)" instead, to match the naming in the README.txt that's generated in the .history folder.

Comment thread KiCad.gitignore
**/*-backups/*.zip

# Archived Backups (KiCad 10.0)
.history/
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern .history/ will only match a .history folder at the repository root level. If .history folders can exist in subdirectories (e.g., within project subfolders), this pattern should be **/.history/ to match at any directory level, consistent with the pattern used for KiCad 6.0 backups above (**/*-backups/*.zip).

Suggested change
.history/
**/.history/

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true. **/ at the front is needed only to match the path at any depth if the pattern includes a level of nesting, like .cache/clangd/. The pattern **/*-backups/*.zip above needs two stars precisely because of that. .history/ works just fine.

@kpzip
Copy link
Copy Markdown

kpzip commented Mar 27, 2026

Should also probably add .history_old/. Although this folder seems to only exist while KiCad is open, the gitignore currently ignores other files that also only exist while KiCad is open (e.g. lock files with ~*.lck), meaning this change would be consistent.

Edit: It seems like there are other folders the new KiCad history system sometimes creates other folders aswell (so far I've seen .history_trim/), might be worth looking into this and figuring out all of the possible .history type folders KiCad can make, or just ignoring all folders starting with .history.

@dmitmel
Copy link
Copy Markdown

dmitmel commented Apr 2, 2026

.history/, .history_old/ and .history_trim/ seem to be all of the names this folder can take, judging by the code in https://github.com/KiCad/kicad-source-mirror/blob/2f9941afc13dc2f4f71642558943c463d50dd87e/common/local_history.cpp (search for usages of the word hist and function historyPath).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants