Skip to content
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

Does auto-commit support removes? #137

Closed
retorquere opened this issue Jan 17, 2021 · 4 comments
Closed

Does auto-commit support removes? #137

retorquere opened this issue Jan 17, 2021 · 4 comments

Comments

@retorquere
Copy link

And if it does, should I rm the file, or git rm the file beforehand?

@stefanzweifel
Copy link
Owner

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

@retorquere
Copy link
Author

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.

@stefanzweifel
Copy link
Owner

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?

@retorquere
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants