Email or username:

Password:

Forgot your password?
Top-level
Jakub Narębski

@b0rk I use it to push **all** my local feature branches to remote with `git push origin :` - here `:` is a special kind of refspec

Before `git push` got `--delete` option it could be used to delete branch in remote repository with `git push origin :branch-to-delete` (push empty into branch).

If GitHub/GitLab/... is configured so that 'main' branch is protected and you cannot push there, you can use `git push origin main:other-name` and then create pull request/merge request.

Not usual cases.

1 comment
Go Up