Remove all files from a github repository with commit date greater than 5 days #40046
-
Select Topic AreaQuestion BodyIs it possible to run a git command from Powershell or a .NET program that would remove all files in a remote repository with a commit date that is more than 5 days older than the current date? If so, does anyone know what this command would look like? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Git history is generally supposed to be permanent, so there's nothing built-in for this. Rewriting history is possible though, so it would certainly be possible to create such a tool. However you should keep in mind that this would cause a lot of trouble if you apply it to a repository shared with anyone else, because with each change they'd have to manually accept the new history. |
Beta Was this translation helpful? Give feedback.
Git history is generally supposed to be permanent, so there's nothing built-in for this. Rewriting history is possible though, so it would certainly be possible to create such a tool. However you should keep in mind that this would cause a lot of trouble if you apply it to a repository shared with anyone else, because with each change they'd have to manually accept the new history.