← 返回命令列表

Linux command

quilt 命令

文本

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

常用示例

Create new patch

quilt new [patch_name.patch]

Add file to patch

quilt add [file]

Apply next patch

quilt push

Remove current patch

quilt pop

Refresh patch

quilt refresh

Show patch series

quilt series

Show diff

quilt diff

Apply all patches

quilt push -a

Remove all applied patches

quilt pop -a

Delete a patch

quilt delete [patch_name.patch]

说明

quilt manages an ordered series of patches against a source tree, allowing patches to be applied, removed, and updated independently. It maintains a series file listing patches in order and a patches/ directory containing the patch files, providing a structured workflow for maintaining modifications on top of upstream code. The typical workflow involves creating a new patch with new, registering files to track with add, making changes, then saving the patch with refresh. Patches can be applied incrementally with push and removed with pop, and the entire series can be reordered or edited. Quilt is widely used in Linux distribution packaging to maintain downstream patches against upstream source.

参数

new _NAME_
Create a new patch with the given name and insert it after the current top patch.
add _FILE_
Register a file to be tracked in the current topmost patch before making changes.
push -a
Apply the next unapplied patch in the series. Use -a to apply all remaining patches.
pop -a
Remove the topmost applied patch, reverting its changes. Use -a to remove all applied patches.
refresh
Update the topmost patch to reflect the current changes to tracked files.
series
List all patches in the series file in order.
diff -z
Show the differences between the current state of tracked files and the topmost patch.
delete -r _NAME_
Remove a patch from the series file. Use -r to also remove the patch file from the patches directory.
edit _FILE_
Add a file to the topmost patch and open it in the default editor.
top
Print the name of the topmost applied patch.
applied
List all currently applied patches.
unapplied
List all patches that have not yet been applied.

FAQ

What is the quilt command used for?

quilt manages an ordered series of patches against a source tree, allowing patches to be applied, removed, and updated independently. It maintains a series file listing patches in order and a patches/ directory containing the patch files, providing a structured workflow for maintaining modifications on top of upstream code. The typical workflow involves creating a new patch with new, registering files to track with add, making changes, then saving the patch with refresh. Patches can be applied incrementally with push and removed with pop, and the entire series can be reordered or edited. Quilt is widely used in Linux distribution packaging to maintain downstream patches against upstream source.

How do I run a basic quilt example?

Run `quilt new [patch_name.patch]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does new _NAME_ do in quilt?

Create a new patch with the given name and insert it after the current top patch.