Git push option squash commit

Hello, I want by command line push to gitlab and create the merge request.
It’s good with the help of
but it didn’t mention how to add the option of automatically squash commit ?

Did I miss something or this option is not available by cmd line ?

For now, i use :

git push origin mybranch -o merge_request.create -o merge_request.title=“title” -o merge_request.description=“description of MR” -o merge_request.remove_source_branch

I tried to add:
-o merge_request.squash
-o merge_request.squash_commits

But it’s not working.

Thanks for your help.

If you look at the Push options table higher up on the page you linked, you will see that those squash options aren’t available.

This may have to be done via the gitlab API directly or the GUI. I don’t recall there being an option on a per-repository settings basis to squash commits for MRs.