Skip to content

nf-core sync silently deletes ignored files #2146

@awgymer

Description

@awgymer

Description of the bug

This may not be the biggest issue, but I recently found that running nf-core sync causes ignored files to be deleted.
This is a particular nuisance as it deletes editor config files such as .vscode/.

Currently the delete is performed using a simple iteration over the files in the directory, skipping the .git folder.
It could be possible to leverage the git.Repo object to skip ignored/untracked files too.

Command used and terminal output

No response

System information

nf-core tools 2.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions