diff --git a/src/generate.jl b/src/generate.jl index a4e41e9..66bb955 100644 --- a/src/generate.jl +++ b/src/generate.jl @@ -72,11 +72,14 @@ function generate( info("Staged $(length(files)) files/directories: $(join(files, ", "))") LibGit2.commit(repo, "Files generated by PkgTemplates") info("Committed files generated by PkgTemplates") + multiple_branches = length(collect(LibGit2.GitBranchIter(repo))) > 1 info("Copying temporary package directory into $(t.dir)") cp(temp_pkg_dir, pkg_dir; remove_destination=force) rm(temp_pkg_dir; recursive=true) info("Finished") - warn("Remember to push all created branches to your remote: git push --all -u") + if multiple_branches + warn("Remember to push all created branches to your remote: git push --all") + end end """