I know we can mention issue in commit messages as'#issue_no', but is it possible to link it to another commit in gitlab?
either mention commit SHA or complete commit URL in the commit message?
See the documentation: https://docs.gitlab.com/user/markdown/#gitlab-specific-references
References Input Cross-project reference Shortcut inside the same namespace Commit (specific) 9ba12248namespace/project@9ba12248project@9ba12248
So you can just use the commit hash within one project.
namespace/project@9ba12248.git log -1 --format=reference. See section "PRETTY FORMATS" in documentation of git log.