Closed retorquere closed 3 years ago
If I understood your question correctly, yes git-auto-commit supports "removes".
If a step in your workflow removes a file or directory, git-auto-commit will detect that and create a commit where the file/directory is being deleted.
If you want to use rm
or git-rm
is up to you.
rm
just removes the file/directory. git-auto-commit will pick up the change and add it to the commit.git-rm
automatically stages the deleted file for the next commit. git-auto-commit will then just create the commit.Notes
Is there anything to configure for this? In this run on my repo, the deletes are detected, but the corresponding commit does not delete the files.
No, there isn't a way to configure git-auto-commit regarding how files are being deleted. git-auto-commit uses just git
under the hood.
However, it's very weird that the /github/*
files are being logged in the Workflow and apparently added to the commit, but will not be actually deleted.
I've also cloned your repo and ran git diff --stat 18f2416..8a314e4
which also shows that only 3 files have been updated.
DagOverzicht.ipynb | 598 ++++++++++++++++---------------------------------------------------------------------------------
LeeftijdsgroepenLandelijk.ipynb | 478 ++++++++++++++++++++++++++++++++++++++---------------------------------------
RegioV2.ipynb | 90 +++++++--------
3 files changed, 382 insertions(+), 784 deletions(-)
Maybe you have to use git-rm
instead of rm
?
Found it -- if I give it a file-spec like *.gz
, that won't match the missing files of course, so they don't get taken along in the commit. If I add the folder they're in, it works. Fortunately for me the folders where I want to track deletes only have one type of file, so the result comes out the same.
And if it does, should I
rm
the file, orgit rm
the file beforehand?