REPOSURGEON(1)
π NAME π
Okay bestie, meet reposurgeon(1) β the tool whose entire brand is surgical operations on repositories. π
β¨
β¨ SYNOPSIS β¨
reposurgeon [command...]
π DESCRIPTION π
So the whole point of reposurgeon is giving you the risky little operations that VCSes (version-control systems) absolutely do not want to let you do. Weβre talking:
- (a) editing past comments and metadata
- (b) excising commits
- (c) coalescing and splitting commits
- (d) removing files and subtrees from repo history
- (e) merging or grafting two or more repos
- (f) cutting a repo in two by cutting a parent-child link, while preserving the branch structure of both child repos.
A major use of reposurgeon is helping a human operator pull off higher-quality conversions among version control systems than fully automated converters can manage. π«Ά
The user interface of reposurgeon resembles a symbolic debugger. It can be used to explore a repository history interactively, but it also has a well-developed scripting capability that can be used to develop and refine recipes. Interactive poking AND scripted recipes? We love a versatile icon. π
Fully supported systems β meaning reposurgeon can both read and write repositories β include git, hg, bzr, brz, Fossil, darcs, RCS, and SRC. There is tested read-side support for SCCS, CVS, and svn. Due to data-model incompatibilities, not all metadata is necessarily passed through in both import and export directions: for details, consult the long-form manual referenced later on this page. π
The Subversion to Git pathway is particularly well tested. On the other hand, the quality of CVS lifts may be poor, with individual lifts requiring serious hand-hacking β this is due to inherent problems with CVSβs file-oriented model and the fragility of its repository structures. CVS girlies, this one comes with a warning label. π
To keep reposurgeon simple and flexible, it normally does not do its own repository reading and writing. Instead, it relies on being able to parse and emit the command streams created by git-fast-export and read by git-fast-import. This means that it can be used on any version-control system that has both fast-export and fast-import utilities. The git-import stream format also implicitly defines a common language of primitive operations for reposurgeon to speak. One stream format, whole vocabulary β lowkey iconic. π
If you donβt have a tool installed that reposurgeon needs, it will bail out gracefully and inform you what is missing. No cryptic meltdown β it tells you the missing piece. π§
In order to deal with version-control systems that do not have fast-export equivalents, reposurgeon can also host extractor code that reads repositories directly. For each version-control system supported through an extractor, reposurgeon uses a small amount of knowledge about the systemβs command-line tools to (in effect) replay repository history into an input stream internally. Repositories under systems supported through extractors can be read by reposurgeon, but not modified by it. In particular, reposurgeon can be used to move a repository history from any VCS supported by an extractor to any VCS supported by a normal importer/exporter pair. β
Mercurial repository reading is implemented with an extractor class; writing is handled with hg-git-fast-import. A test extractor exists for git, but is normally disabled in favor of the regular exporter. Little test extractor behavior, noted for the record. π
For details on how to operate reposurgeon, see the Repository Editing and Conversion With Reposurgeon long-form manual at http://www.catb.org/esr/reposurgeon/repository-editing.html. π¦
π ERROR RETURNS π
Returns 1 if the last command executed threw an error, 0 otherwise. Thatβs it β binary mood, no mystery. π
π SEE ALSO π
π AUTHOR π
Eric S. Raymond esr@thyrsus.com; see the project page http://www.catb.org/~esr/reposurgeon. π«Ά
π This was the REPOSURGEON(1) manual page β source/version tag and all β dated 2026-09-14. Bye bestie, go make those repos slay. πβ¨
π¦ where this page comes from
- epel 10: reposurgeon 5.11-1.el10_3 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms