← 返回命令列表

Linux command

git-mr 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Check out merge request from origin

git mr [51]

Check out merge request from a specific remote

git mr [51] [upstream]

Check out merge request by URL

git mr [https://gitlab.com/owner/repo/merge_requests/51]

Clean up all local mr/ branches

git mr clean

说明

git mr fetches a GitLab merge request head by its number or URL and checks it out in a local branch named mr/_number_. It handles ref fetching and branch creation in a single step, simplifying the code review workflow. For GitHub repositories, the equivalent command is `git pr`.

参数

clean
Delete all local mr/ branches.
--help
Display help information.

FAQ

What is the git-mr command used for?

git mr fetches a GitLab merge request head by its number or URL and checks it out in a local branch named mr/_number_. It handles ref fetching and branch creation in a single step, simplifying the code review workflow. For GitHub repositories, the equivalent command is `git pr`.

How do I run a basic git-mr example?

Run `git mr [51]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does clean do in git-mr?

Delete all local mr/ branches.