class Git::Commands::Remote::SetHead

‘git remote set-head` command

Sets or deletes the default branch (symbolic HEAD) for the named remote.

@example Set the remote HEAD to a specific branch

set_head = Git::Commands::Remote::SetHead.new(execution_context)
set_head.call('origin', 'main')

@example Auto-detect the remote HEAD by querying the remote

set_head = Git::Commands::Remote::SetHead.new(execution_context)
set_head.call('origin', auto: true)

@example Delete the remote HEAD symbolic ref

set_head = Git::Commands::Remote::SetHead.new(execution_context)
set_head.call('origin', delete: true)

@note ‘arguments` block audited against git-scm.com/docs/git-remote/2.53.0

@see Git::Commands::Remote

@see git-scm.com/docs/git-remote git-remote

@api private