This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ed061c8211 Added a git clean command to remove untracked files 
(#48555)
3ed061c8211 is described below

commit 3ed061c82111756573e149f97e1a31feafeeed6f
Author: Aritra Basu <[email protected]>
AuthorDate: Mon Mar 31 09:18:05 2025 +0530

    Added a git clean command to remove untracked files (#48555)
    
    This removes all untracked files except .venv and .idea
    we can add to the list of folders if needed.
---
 dev/breeze/src/airflow_breeze/commands/main_command.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dev/breeze/src/airflow_breeze/commands/main_command.py 
b/dev/breeze/src/airflow_breeze/commands/main_command.py
index 12af3e5bbb8..19e28a6b8f1 100644
--- a/dev/breeze/src/airflow_breeze/commands/main_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/main_command.py
@@ -303,3 +303,13 @@ def cleanup(all: bool):
             run_command(["pip", "uninstall", "apache-airflow", "--yes"], 
check=False)
     elif given_answer == Answer.QUIT:
         sys.exit(0)
+    get_console().print("Removing build file and untracked files")
+    given_answer = user_confirm("Are you sure with the removal of build 
files?")
+    if given_answer == Answer.YES:
+        system_prune_command_to_execute = ["git", "clean", "-fdx", "-e", 
".idea/", "-e", ".venv/"]
+        run_command(
+            system_prune_command_to_execute,
+            check=False,
+        )
+    elif given_answer == Answer.QUIT:
+        sys.exit(0)

Reply via email to