]> xn--ix-yja.es Git - alex.git/commitdiff
Apply Git learnings, update subrepo advice
authorAlex <alex.corcoles@veecle.io>
Fri, 12 Sep 2025 13:58:10 +0000 (15:58 +0200)
committeralexpdp7 <alex@corcoles.net>
Fri, 12 Sep 2025 13:59:32 +0000 (15:59 +0200)
programming/git/git_advice.md
programming/python/project_setup.md

index 2df2e07d3bc0d1f7ab908d12a5c9ccd965019be1..7dd19818aaec721dc1cddab29e1c0bff2bbffa57 100644 (file)
@@ -7,19 +7,11 @@ Configure your system so that `git commit` opens your preferred editor.
 With `git commit -v` you can see your commit diff while writing your commit message.
 This helps you review that your commit is correct and write a better commit message.
 
-## Use a global gitignore
+## Use gitignore properly
 
-See <https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration.html#_core_excludesfile>.
+See <https://git-scm.com/docs/gitignore>.
 
-I recommend that the `.gitignore` in a Git repository should only include files that the "supported" procedures for working of your repository generate.
-For example, `.gitignore` should exclude files generated by running or compiling the project.
-
-If your editor or operating system generates files in the repository, I suggest those are not excluded by the `.gitignore` in the repository, but on your personal global gitignore.
-
-This is more efficient:
-
-* You only have to add exclusions that you need once.
-* The project `.gitignore` is smaller and requires less mental overhead to maintain.
+Note that by default, Git defaults to `$XDG_CONFIG_HOME/git/ignore` or `$HOME/.config/git/ignore`.
 
 ## Use the modern Git commands (or teach them)
 
index 493c65b7565473bbfff698726146829495fe4bb1..1eb54307e8fc8b0e188dd49e15c4b6e77a0792c7 100644 (file)
@@ -65,7 +65,7 @@ Use Ruff to format and lint your code.
 
 ## Use a minimal gitignore file
 
-Keep editor-specific ignores in a personal `excludesfile`. Do not include patterns in gitignore which do not match anything generated by documented and supported development procedures.
+See <../git/git_advice.md#use-gitignore-properly>.
 
 ## Keep your code together
 
@@ -73,7 +73,7 @@ All the code you modify as part of the project should be kept in a single reposi
 
 Use git submodules or similar mechanisms to refer to code you modify that must be kept external.
 
-Use git subrepo to publish parts of the repository outside the main repository if needed.
+Use [Josh](../git/combining_repos_with_josh_filter.md) to publish parts of the repository outside the main repository if needed.
 
 # Support multiple modern versions of Python