FreeBSD Manual Pages
GIT-MFC(1) General Commands Manual GIT-MFC(1) NAME git mfc -- cherry-pick commits from an upstream branch to a stable or re- lease branch SYNOPSIS git mfc [-efn] [--ignore-reverts] [--origin branch] [-r remote] revision ... git mfc --pending [-a author] [--all] [--baking] [--origin branch] [-r remote] git mfc --dangling [-a author] [--all] [--origin branch] [-r remote] DESCRIPTION The git mfc utility helps with MFCing (merge from CURRENT) commits to FreeBSD stable and release branches. It must be run from a checkout of the branch being MFCed to. The origin branch is determined automatically and can be overridden with the --origin option. There are three modes of operation: 1. In the default mode, one or more revisions are specified on the com- mand line. Each revision is cherry-picked with -x to the current branch. The origin branch is scanned for commits with "Fixes:", "MFC-with:", or "MFC with:" tags referencing any of the specified re- visions, and those fixup commits are automatically included in the correct order. If a specified revision has been reverted on the origin branch, git mfc refuses to cherry-pick it unless --ignore-reverts is given. Fixup commits that have been reverted are skipped with a warning. Commits that have already been cherry-picked to the current branch are automatically skipped. This allows the same git mfc command to be re- run after resolving a conflict without re-applying earlier commits. Use -f to override this behavior. 2. In --pending mode, no revisions are specified. Instead, git mfc scans the origin branch for commits with "MFC after:" tags whose waiting pe- riod has elapsed and which have not already been cherry-picked to the current branch. Commits that have been reverted upstream are ex- cluded. By default, only commits authored by the current user (as determined by git-config(1)) are shown. 3. In --dangling mode, no revisions are specified. Instead, git mfc finds commits in the current branch that have been cherry-picked from the origin branch but are missing associated fixup commits. Fixup commits that have been reverted upstream are excluded. By default, only cherry-picks authored by the current user (as determined by git- config(1)) are considered. The following options are available: -a author, --author author With --pending or --dangling, filter results to commits whose author email contains the given string. By default, the value of user.email from git-config(1) is used. --all With --pending or --dangling, show commits from all authors in- stead of only the current user. --dangling Find cherry-picked commits in the current branch that are miss- ing fixup commits from the origin branch. Cannot be combined with --pending or revision arguments. -e, --edit Open the commit message in an editor before committing each cherry-pick. Passed through to git-cherry-pick(1). -f, --force Cherry-pick commits even if they appear to have already been cherry-picked to the current branch. By default, git mfc skips commits that are already present. --ignore-reverts Cherry-pick commits even if they have been reverted on the ori- gin branch. Without this flag, git mfc exits with an error when a reverted commit is specified. --baking With --pending, also show commits whose "MFC after:" waiting pe- riod has not yet elapsed. These are annotated with the date they become ready. -n Dry run. List the commits that would be cherry-picked, but do not actually cherry-pick them. The remote is not fetched in this mode. --origin branch Specify the upstream branch name. The default is determined au- tomatically from sys/conf/newvers.sh: "main" for STABLE branches and "stable/major" for RELEASE branches. --pending Show upstream commits with "MFC after:" tags that are ready to be cherry-picked. Cannot be combined with --dangling or revi- sion arguments. -r remote, --remote remote Specify the git remote to fetch from. The default is the cur- rently checked-out branch's upstream remote. Before running any operation, git mfc ensures that the origin is up to date by fetching it from the specified remote. IMPLEMENTATION NOTES git mfc is implemented in Python and depends on the gitpython module. git mfc uses text strings in commit log messages to establish relationships between commits. It recognizes the following tags in commit log messages: "Fixes: hash" Indicates that this commit fixes the commit identified by hash. When MFCing the referenced commit, git mfc will automatically include this fixup commit. "MFC-with: hash, "MFC with: hash"" Equivalent to "Fixes:"; indicates that this commit should be MFCed together with the referenced commit. "MFC after: N unit" Indicates that this commit should be MFCed after the specified waiting period. Recognized units are "day", "days", "week", "weeks", "month", and "months". Used by the --pending mode. git mfc also looks for strings of the form, "This reverts commit hash", in- serted by git-revert(1), and "cherry picked from commit hash", inserted by git-cherry-pick(1). EXAMPLES Cherry-pick a single commit to the current branch, automatically including any fixup commits: $ git mfc abc123 Cherry-pick a range of commits: $ git mfc abc123~..def456 Preview which commits would be cherry-picked without actually doing it: $ git mfc -n abc123 Cherry-pick a commit, opening an editor to amend the commit message first: $ git mfc -e abc123 List your commits that are ready for MFC: $ git mfc --pending List pending commits from all authors: $ git mfc --pending --all Include commits whose MFC-after period has not yet elapsed: $ git mfc --pending --baking List commits ready for MFC by a specific author: $ git mfc --pending -a markj@FreeBSD.org Find MFCs in the current branch that are missing fixup commits: $ git mfc --dangling Cherry-pick a commit that was reverted upstream: $ git mfc --ignore-reverts abc123 Use a different remote and origin branch: $ git mfc -r freebsd --origin main abc123 SEE ALSO git-cherry-pick(1), git-config(1), git-revert(1), development(7) AUTHORS The git mfc utility was written by Mark Johnston <markj@FreeBSD.org>. FreeBSD ports 15.quarterly June 26, 2026 GIT-MFC(1)
NAME | SYNOPSIS | DESCRIPTION | IMPLEMENTATION NOTES | EXAMPLES | SEE ALSO | AUTHORS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=git-mfc&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>
