← 返回命令列表

Linux command

mergiraf 命令

文本

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

常用示例

Register mergiraf as a Git merge driver

mergiraf register

Use as a Git merge driver

*.rs merge=mergiraf

Resolve conflicts

mergiraf resolve [path/to/conflicted_file]

Resolve with explicit language

mergiraf resolve -L [rust] [path/to/conflicted_file]

Review mergiraf's automatic resolution

mergiraf review [path/to/file]

List supported languages

mergiraf languages

说明

mergiraf is a syntax-aware Git merge driver that resolves merge conflicts by parsing the syntax tree of code and structured files. It supports many languages including TypeScript, Python, Java, Rust, JSON, and YAML. It operates as a drop-in driver for git merge, git rebase, and cherry-pick, but can also be run manually after a conflict. When it cannot safely auto-merge, it leaves clear conflict markers for manual review.

参数

-L, --language _LANG_
Specify language by name or file extension.

FAQ

What is the mergiraf command used for?

mergiraf is a syntax-aware Git merge driver that resolves merge conflicts by parsing the syntax tree of code and structured files. It supports many languages including TypeScript, Python, Java, Rust, JSON, and YAML. It operates as a drop-in driver for git merge, git rebase, and cherry-pick, but can also be run manually after a conflict. When it cannot safely auto-merge, it leaves clear conflict markers for manual review.

How do I run a basic mergiraf example?

Run `mergiraf register` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -L, --language _LANG_ do in mergiraf?

Specify language by name or file extension.