class Git::Commands::Push

Implements the ‘git push` command

Updates remote refs using local refs, while sending objects necessary to complete the given refs.

@example Push to the default remote

push = Git::Commands::Push.new(execution_context)
push.call

@example Push to a named remote

push = Git::Commands::Push.new(execution_context)
push.call('origin')

@example Push a specific branch to a remote

push = Git::Commands::Push.new(execution_context)
push.call('origin', 'main')

@example Force push to a remote branch

push = Git::Commands::Push.new(execution_context)
push.call('origin', 'main', force: true)

@example Push with a server-side option

push = Git::Commands::Push.new(execution_context)
push.call('origin', push_option: 'ci.skip')

@example Push all tags to a remote

push = Git::Commands::Push.new(execution_context)
push.call('origin', tags: true)

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

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

@see Git::Commands

@api private