For gitlab this is only correct with a shell executor which is to be avoided in the general case in favor of a docker or k8s executor for isolation&repeatability.
Those you can actually run locally with gitlab-runner, but then you won't have all your gitlab instance's CI variables so it's a PITA if you need a CI token which you probably do if you actually make decent use of gitlab's features.
In most cases I just end up committing my changes to avoid the headache. :!git commit --amend --no-edit && git push -f goes pretty dang fast and 60 % of the time third time's the charm.
The kind of person who blindly runs commands also blindly runs any .exe or .bat they download from github which is not any better.
Of course in an ideal world there'd be a perfect GUI for everything, and we've gotten a lot better at that in the last few years. But it's not like windows is lacking in things that are only configurable through CLI or the registry (which is even more opaque). I'm not saying Linux is perfect, just pointing out the hypocrisy.