How do I move a commit from another branch?

Hello everyone, how do I move a commit from a branch of another repository to mine? Tried using the command git cherry-pick "hash сommit" but writes Bad object…


The commit you cherry-pick must be available in your local repository before you can cherry-pick. You can achieve that by adding the other repository as a remote and fetching, see: Git - Working with Remotes