class Rails::Generators::AppBase
def git_init_command
def git_init_command return "git init" if user_default_branch.strip.present? git_version = `git --version`[/\d+\.\d+\.\d+/] if Gem::Version.new(git_version) >= Gem::Version.new("2.28.0") "git init -b main" else "git init && git symbolic-ref HEAD refs/heads/main" end end