git nested commit
Add a nested branch to the current history as one commit.
git nested commit [<options>] [<subdir> [<nested-commit>]]
What it does
commit takes the nested branch and puts its content into <subdir>. It
updates .gitnested and makes one commit. Then it removes the worktree.
This is the last step of a pull you finished by hand. See Resolve conflicts.
It needs a clean working tree, and a worktree of the nested branch.
Arguments
Argument |
Meaning |
|---|---|
|
the nested repository. Can be left out inside it |
|
the branch or commit to add. Default: |
Options
Option |
Meaning |
|---|---|
|
fetch upstream first |
|
commit even if the branch does not contain the fetched upstream commit |
|
the commit message |
|
read the commit message from a file |
|
GPG-sign the commit |
|
add a |
Examples
git nested commit ext/lib
git nested commit --file=msg.txt ext/lib
Notes
commitneeds the refrefs/nested/<subdir>/fetch. A pull or fetch makes it. Or pass-F.The branch must contain the fetched upstream commit. Otherwise upstream changes would be lost.
--forceskips this check.