|
|
|
|
|
by modulared
323 days ago
|
|
> I could disable autoadding files, but life will be worse that way. ```
[snapshot]
auto-track = 'none()'
``` This is what I do, and I don't think it is worse. I prefer not having all my ignored files auto-tracked when I accidentally go back to a commit without them in the .gitignore Some other solutions (which aren't simple at all):
- Remove specific files from auto-track
- Have a private commit with changes to the .gitignore and work on top of a merge commit
- Like last one, have a private commit with the files you don't want to push (+ merge) I have it setup where any commit with a description that starts with "IGNORE:" is private. snippet from my config:
```
[git]
private-commits = '''
description(regex:"(?x)
# (?x) enables the x flag (verbose mode) allowing comments and ignores whitespace
# see: https://docs.rs/regex/latest/regex/#grouping-and-flags # Ignores commits starting with:
# (case-insensitive) PRIV: or PRIVATE:, or IGNORE:
^(?i:PRIV(ATE)?):
| ^IGNORE:
")
'''
``` |
|