WhatIf?

Function Push-Me {
	[CmdletBinding(SupportsShouldProcess)]
	Param([Parameter(ValueFromRemainingArguments)] $args)

	if ($PSCmdlet.ShouldProcess($args)) {
		git push @args
	}
	else {
		git push --dry-run @args
	}
}

Push-Me -Confirm
Push-Me -WhatIf

$args is not available in advanced functions (as defined by CmdletBinding)

reference another example