module Bridgetown::Commands::GitHelpers
Public Instance Methods
destroy_existing_repo()
click to toggle source
# File lib/bridgetown-core/commands/concerns/git_helpers.rb, line 11 def destroy_existing_repo run "rm -rf .git" end
initialize_new_repo()
click to toggle source
# File lib/bridgetown-core/commands/concerns/git_helpers.rb, line 6 def initialize_new_repo run "git init", abort_on_failure: true `git symbolic-ref HEAD refs/heads/main` if user_default_branch.empty? end
user_default_branch()
click to toggle source
# File lib/bridgetown-core/commands/concerns/git_helpers.rb, line 15 def user_default_branch @user_default_branch ||= `git config init.defaultbranch`.strip end