-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: staging/unstaging cause problems with .gitignore and/or file deletion #196
Comments
You are right that using
Have you tried staging all files via |
Just in case there's a thing that matters in there, here's the {
"commitMessage": "autocommit {{hostname}} +{{numFiles}} @ {{date}}",
"commitDateFormat": "YYYY-MM-DDTHH:mm:ss",
"autoSaveInterval": 5,
"autoPullInterval": 60,
"autoPullOnBoot": true,
"disablePush": false,
"pullBeforePush": true,
"disablePopups": false,
"listChangedFilesInMessageBody": false,
"showStatusBar": true,
"updateSubmodules": false,
"syncMethod": "merge",
"gitPath": "C:\\Users\\redacted\\AppData\\Local\\Microsoft\\WindowsApps\\git.cmd",
"customMessageOnAutoBackup": false,
"autoBackupAfterFileChange": true,
"treeStructure": false
} The only thing that might plausibly have an influence is if you have submodule handling enabled (because that will indeed do a |
I think that's strange. (I don't have submodules enabled) I don't know what's different/wrong on your end, because I expect more/earlier issues from other users. Will "fix" that nevertheless. |
Ah just noticed why it might not always affect others: If things are in (non-hidden) subdirectories, then deletions / renames work fine. (Because the
the glob fails. That would explain why noone else has complained yet. |
Describe the bug
The automatic backup tries to manually enumerate and add all files. If some of these files are listed in the
.gitignore
, that will abort with an error message instead of only adding tracked and new files.Further, this causes
git
to never record file deletions, since nonexistent files will never be matched by the file glob expansion.Relevant errors (if available)
Steps to reproduce
.gitignore
(best use a file in the vault root directory, not sure if deeper levels also fail)and concerning deletion
git status
)Expected Behavior
All changes are recorded and committed, the presence of ignored files shouldn't interfere.
Addition context
The submodule path uses
git add -A
, not sure why this isn't also used for the normal path. (That should avoid both problems.)Same problem of using globs instead of built-in selectors also appears in other places, at least in
stageAll
in the same way, andunstageAll
just below (just agit reset
with no arguments should achieve exactly the intended "unstage all" effect.)Operating system
Windows
The text was updated successfully, but these errors were encountered: