From 9eab466b9c04029078544672f92e432007a9f456 Mon Sep 17 00:00:00 2001 From: Manager Bot Date: Wed, 7 Dec 2022 23:32:30 +0000 Subject: [PATCH] Now with new git stuff. --- Web/lib/MJB/Web/Plugin/Jekyll/Blog.pm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Web/lib/MJB/Web/Plugin/Jekyll/Blog.pm b/Web/lib/MJB/Web/Plugin/Jekyll/Blog.pm index d8fca94..3658bad 100644 --- a/Web/lib/MJB/Web/Plugin/Jekyll/Blog.pm +++ b/Web/lib/MJB/Web/Plugin/Jekyll/Blog.pm @@ -107,13 +107,28 @@ sub init { # Clone the template repo $self->system_command( [ qw( git clone ), $self->init_from, $self->repo_path ] ); + + # Kill the git repo + $self->system_command( [ qw( rm -fr .git ) ], { + chdir => $self->repo_path, + }); - # Update the origin that is set - $self->system_command( [ qw( git remote set-url origin ), $self->repo ], { + # Create new git repo + $self->system_command( [ qw( git init ) ], { + chdir => $self->repo_path, + }); + + # Add all the files. + $self->system_command( [ qw( git add .gitignore * ) ], { + chdir => $self->repo_path, + }); + + # Add the origin + $self->system_command( [ qw( git remote add origin ), $self->repo ], { chdir => $self->repo_path, }); - # Confirm the origin updated + # Confirm the origin my $return = $self->system_command( [ qw( git remote get-url origin ) ], { chdir => $self->repo_path, });