summaryrefslogtreecommitdiff
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-28 17:06:57 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-28 17:06:57 -0800
commitd25430c5f88c7e7b4ce24c1b08e409f4345c4eb9 (patch)
tree88de4825ce11d7eaed4719b0b9db1d0e649f9107 /Documentation/git-branch.txt
parentb3a4f8586b4ffa6c896cf0afb2ea49d64faf81ad (diff)
parent38762c47d6442dc0ce0f45533f9151877c485337 (diff)
downloadgit-d25430c5f88c7e7b4ce24c1b08e409f4345c4eb9.tar.gz
Merge branch 'maint'
* maint: scripts: do not get confused with HEAD in work tree Improve description of git-branch -d and -D in man page.
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt21
1 files changed, 14 insertions, 7 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 5ce905de86..f87b6968b4 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -45,17 +45,22 @@ to happen.
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
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
-to delete remote-tracking branches.
+has a reflog then the reflog will also be deleted.
+
+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
-------
-d::
- Delete a branch. The branch must be fully merged.
+ Delete a branch. The branch must be fully merged in HEAD.
-D::
- Delete a branch irrespective of its index status.
+ Delete a branch irrespective of its merged status.
-l::
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>
------------
+
-<1> Delete remote-tracking branches "todo", "html", "man"
-<2> Delete "test" branch even if the "master" branch does not have all
-commits from test branch.
+<1> Delete remote-tracking branches "todo", "html", "man". Next 'fetch' or
+'pull' will create them again unless you configure them not to. See
+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