git nested clean
Remove the branches, refs and remotes nested operations created.
git nested clean [<options>] [<subdir>]
git nested clean --all [<options>]
What it does
clean removes what other commands left behind for <subdir>:
the nested branch,
its worktree,
the git remote
branchmade,the branch name
--namestored.
Nothing in your own history is touched. So clean is also how you give up
a pull or push that is half done.
It works without .gitnested too, for example after a reset undid the
clone.
Arguments
Argument |
Meaning |
|---|---|
|
the nested repository. Can be left out inside it |
Options
Option |
Meaning |
|---|---|
|
clean all nested repositories |
|
also the nested repositories inside nested repositories |
|
also remove the refs under |
With --all --force, clean also removes every leftover nested/*
branch of this worktree, and all nested refs. That catches nested
repositories that do not exist any more.
Examples
git nested clean ext/lib
git nested clean --all
git nested clean --all --force