зеркало из https://github.com/microsoft/git.git
Improve description of git-branch -d and -D in man page.
Some users expect that deleting a remote-tracking branch would prevent fetch from creating it again, so be explcit about that it's not the case. Also be a little more explicit about what fully merged means. Signed-off-by: Jan Hudec <bulb@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
dc3e3ea3c8
Коммит
1e72a40de9
|
@ -45,17 +45,22 @@ to happen.
|
||||||
|
|
||||||
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
|
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
|
||||||
specify more than one branch for deletion. If the branch currently
|
specify more than one branch for deletion. If the branch currently
|
||||||
has a reflog then the reflog will also be deleted. Use -r together with -d
|
has a reflog then the reflog will also be deleted.
|
||||||
to delete remote-tracking branches.
|
|
||||||
|
Use -r together with -d to delete remote-tracking branches. Note, that it
|
||||||
|
only makes sense to delete remote-tracking branches if they no longer exist
|
||||||
|
in remote repository or if gitlink:git-fetch[1] was configured not to fetch
|
||||||
|
them again. See also 'prune' subcommand of gitlink:git-remote[1] for way to
|
||||||
|
clean up all obsolete remote-tracking branches.
|
||||||
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
-d::
|
-d::
|
||||||
Delete a branch. The branch must be fully merged.
|
Delete a branch. The branch must be fully merged in HEAD.
|
||||||
|
|
||||||
-D::
|
-D::
|
||||||
Delete a branch irrespective of its index status.
|
Delete a branch irrespective of its merged status.
|
||||||
|
|
||||||
-l::
|
-l::
|
||||||
Create the branch's reflog. This activates recording of
|
Create the branch's reflog. This activates recording of
|
||||||
|
@ -153,9 +158,11 @@ $ git branch -d -r origin/todo origin/html origin/man <1>
|
||||||
$ git branch -D test <2>
|
$ git branch -D test <2>
|
||||||
------------
|
------------
|
||||||
+
|
+
|
||||||
<1> Delete remote-tracking branches "todo", "html", "man"
|
<1> Delete remote-tracking branches "todo", "html", "man". Next 'fetch' or
|
||||||
<2> Delete "test" branch even if the "master" branch does not have all
|
'pull' will create them again unless you configure them not to. See
|
||||||
commits from test branch.
|
gitlink:git-fetch[1].
|
||||||
|
<2> Delete "test" branch even if the "master" branch (or whichever branch is
|
||||||
|
currently checked out) does not have all commits from test branch.
|
||||||
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
|
|
Загрузка…
Ссылка в новой задаче