From 410f4abb68841ff2cfc0e109c650e04d46a812fd Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Fri, 27 Mar 2026 16:45:30 +1100 Subject: [PATCH] tutorial: add .gitignore before git add -A in step 3.1 Without a .gitignore, vendored C library binaries (lib/*.so, lib/*.dylib, lib/*.a) and the Nix result symlink get staged by git add -A. Add a .gitignore block to the tutorial so readers exclude them from the start. Co-Authored-By: Claude Sonnet 4.6 --- tutorial-wrapping-c-library.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tutorial-wrapping-c-library.md b/tutorial-wrapping-c-library.md index 9e62bfa..afcbb07 100644 --- a/tutorial-wrapping-c-library.md +++ b/tutorial-wrapping-c-library.md @@ -493,7 +493,25 @@ QString CalcModulePlugin::libVersion() ### 3.1 Initialize the Git repo -Nix flakes require a git repository: +Nix flakes require a git repository. + +Before staging files, create a `.gitignore` to exclude vendored binaries and build artifacts: + +``` +# Vendored C library binaries (built by nix, do not commit) +lib/*.so +lib/*.dylib +lib/*.a + +# Nix build output +result +result-* + +# CMake build directory +build/ +``` + +Then initialise the repo: ```bash cd logos-calc-module