-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
@mawildoer wrote this (untested)
Not sure whether we want clearing the git history though
# Remove/re-init .git dir ----------------------------------------
try:
if (root / ".git").exists():
console.print("Removing .git directory")
if not dry_run:
subprocess.run(
["rm", "-rf", ".git"],
cwd=root,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except subprocess.CalledProcessError as e:
console.print(f"[red]Error removing .git dir:[/red] {e}")
else:
if not dry_run:
subprocess.run(
["git", "init"],
cwd=root,
check=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
Metadata
Metadata
Assignees
Labels
No labels