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, });