git push -n
Performs a dry run of the `git push` operation
This command simulates the git push
operation without actually sending any commits to the remote repository.
It is useful for verifying which commits would be pushed to a remote branch if the command were executed without the -n
(or --dry-run
) flag.
This can help prevent errors by allowing users to confirm the changes that will be pushed.
Variants include using -v
(--verbose
) to increase the verbosity of the output or combining with other git push
options, such as specifying a specific branch to push with git push -n origin <branch-name>
.