{"thread":{"id":"10845","subject":"[Newbie] How to *actually* get rid of remote tracking branch?","startedAt":"2007-11-13T14:25:39Z","lastAt":"2007-11-19T09:49:54Z","messageCount":28,"participants":["Sergei Organov","Jakub Narebski","Johannes Schindelin","Steffen Prohaska","osv@javad.com","Lars Hjemli","Andreas Ericsson","J. Bruce Fields","Junio C Hamano","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"59666","messageId":"874pfq9q8s.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":null,"subject":"[Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T14:25:39Z","receivedAt":"2007-11-13T14:25:39Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Hello,\n\nI want to get rid of origin/pu remote tracking branch. What do I do? I\nRTFM git-branch. What does it suggest?\n\ngit branch -d -r origin/pu\n\nSo far so good. However, it doesn't seem to work in practice:\n\n$ git --version\ngit version 1.5.3.4\n$ git remote show origin\n* remote origin\n  URL: git://git.kernel.org/pub/scm/git/git.git\n  Remote branch(es) merged with 'git pull' while on branch master\n    master\n  Tracked remote branches\n    html maint man master next pu todo\n$ git branch -d -r origin/pu\nDeleted remote branch origin/pu.\n$ git remote show origin\n* remote origin\n  URL: git://git.kernel.org/pub/scm/git/git.git\n  Remote branch(es) merged with 'git pull' while on branch master\n    master\n  New remote branches (next fetch will store in remotes/origin)\n    pu\n  ^^^^^^^^^^^^^^^^^^^ What???  \n  Tracked remote branches\n    html maint man master next todo\n$ git fetch\nremote: Generating pack...\nremote: Done counting 422 objects.\nResult has 281 objects.\nremote: Deltifying 281 objects...\nremote:  100% (281/281) done\nIndexing 281 objects...\nremote: Total 281 (delta 206), reused 255 (delta 181)\n 100% (281/281) done\nResolving 206 deltas...\n 100% (206/206) done\n63 objects were added to complete this thin pack.\n* refs/remotes/origin/pu: storing branch 'pu' of git://git.kernel.org/pub/scm/git/git\n  commit: fc07419\n$ git remote show origin\n* remote origin\n  URL: git://git.kernel.org/pub/scm/git/git.git\n  Remote branch(es) merged with 'git pull' while on branch master\n    master\n  Tracked remote branches\n    html maint man master next pu todo\n$\n\n... and I get those origin/pu back?!\n\nWhat do I do wrong?\n\n-- \nSergei.\n"},{"id":"59670","messageId":"fhcdpv$9u3$1@ger.gmane.org","threadId":"10845","inReplyTo":"874pfq9q8s.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-13T14:53:52Z","receivedAt":"2007-11-13T14:53:52Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"[Cc: Sergei Organov <osv@javad.com>, git@vger.kernel.org]\nPlease CC git mailing list, git@vger.kernel.org\n\nSergei Organov wrote:\n\n> Hello,\n> \n> I want to get rid of origin/pu remote tracking branch. What do I do? I\n> RTFM git-branch. What does it suggest?\n> \n> git branch -d -r origin/pu\n> \n> So far so good. However, it doesn't seem to work in practice:\n \n\n> $ git branch -d -r origin/pu\n> Deleted remote branch origin/pu.\n> $ git remote show origin\n> * remote origin\n>   URL: git://git.kernel.org/pub/scm/git/git.git\n>   Remote branch(es) merged with 'git pull' while on branch master\n>     master\n>   New remote branches (next fetch will store in remotes/origin)\n>     pu\n>   ^^^^^^^^^^^^^^^^^^^ What???  \n>   Tracked remote branches\n>     html maint man master next todo\n\nCheck out what do you have in .git/config file, in the [remote \"origin\"]\nsection. Most probably (if you cloned this repository using new enough git)\nyou have wildcard refspec there, which means that git would pick all new\nbranches when fetching / pulling from given repository. The wildcard\nrefspec is not documented adequately, so I'm not sure if adding\n\n        fetch = !refs/heads/pu\n\nwould help, or do you have to replace wildcard refspec by explicit list of\nbranches you want to fetch.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"59674","messageId":"87ve86889o.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"fhcdpv$9u3$1@ger.gmane.org","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T15:39:15Z","receivedAt":"2007-11-13T15:39:15Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> [Cc: Sergei Organov <osv@javad.com>, git@vger.kernel.org]\n> Please CC git mailing list, git@vger.kernel.org\n>\n> Sergei Organov wrote:\n>\n>> Hello,\n>> \n>> I want to get rid of origin/pu remote tracking branch. What do I do? I\n>> RTFM git-branch. What does it suggest?\n>> \n>> git branch -d -r origin/pu\n>> \n>> So far so good. However, it doesn't seem to work in practice:\n>  \n>\n>> $ git branch -d -r origin/pu\n>> Deleted remote branch origin/pu.\n>> $ git remote show origin\n>> * remote origin\n>>   URL: git://git.kernel.org/pub/scm/git/git.git\n>>   Remote branch(es) merged with 'git pull' while on branch master\n>>     master\n>>   New remote branches (next fetch will store in remotes/origin)\n>>     pu\n>>   ^^^^^^^^^^^^^^^^^^^ What???  \n>>   Tracked remote branches\n>>     html maint man master next todo\n>\n> Check out what do you have in .git/config file, in the [remote \"origin\"]\n> section. Most probably (if you cloned this repository using new enough git)\n> you have wildcard refspec there, which means that git would pick all new\n> branches when fetching / pulling from given repository.\n\nSure, I've cloned git.git using rather recent git, so .git/config has:\n\n      fetch = +refs/heads/*:refs/remotes/origin/*\n\n> The wildcard refspec is not documented adequately, so I'm not sure if\n> adding\n>\n>         fetch = !refs/heads/pu\n>\n> would help, or do you have to replace wildcard refspec by explicit list of\n> branches you want to fetch.\n\nIsn't \"git branch -d -r\" supposed to do whatever magic is required to\nget rid of the remote branch? Currently it seems like a bug introduced\nby addition of wildcards refspecs, right?\n\n-- \nSergei.\n"},{"id":"59675","messageId":"Pine.LNX.4.64.0711131600590.4362@racer.site","threadId":"10845","inReplyTo":"87ve86889o.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-13T16:01:31Z","receivedAt":"2007-11-13T16:01:31Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 13 Nov 2007, Sergei Organov wrote:\n\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > The wildcard refspec is not documented adequately, so I'm not sure if \n> > adding\n> >\n> >         fetch = !refs/heads/pu\n> >\n> > would help, or do you have to replace wildcard refspec by explicit \n> > list of branches you want to fetch.\n> \n> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n> get rid of the remote branch?\n\nBut it did!  You explicitely fetched it _again_!\n\nCiao,\nDscho\n"},{"id":"59676","messageId":"200711131703.16357.jnareb@gmail.com","threadId":"10845","inReplyTo":"87ve86889o.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-13T16:03:16Z","receivedAt":"2007-11-13T16:03:16Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Sergei Organov <osv@javad.com> wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n>> Sergei Organov wrote:\n\n>>> I want to get rid of origin/pu remote tracking branch. What do I do?\n>>> I RTFM git-branch. What does it suggest?\n>>> \n>>> git branch -d -r origin/pu\n>>> \n>>> So far so good. However, it doesn't seem to work in practice:\n[...]\n>>> $ git branch -d -r origin/pu\n>>> Deleted remote branch origin/pu.\n>>> $ git remote show origin\n>>> * remote origin\n>>>   URL: git://git.kernel.org/pub/scm/git/git.git\n>>>   Remote branch(es) merged with 'git pull' while on branch master\n>>>     master\n>>>   New remote branches (next fetch will store in remotes/origin)\n>>>     pu\n>>>   ^^^^^^^^^^^^^^^^^^^ What???  \n>>>   Tracked remote branches\n>>>     html maint man master next todo\n>>\n>> Check out what do you have in .git/config file, in the\n>> [remote \"origin\"] section. Most probably (if you cloned this\n>> repository using new enough git) you have wildcard refspec there,\n>> which means that git would pick all new branches when\n>> fetching / pulling from given repository. \n> \n> Sure, I've cloned git.git using rather recent git, so .git/config has:\n> \n>       fetch = +refs/heads/*:refs/remotes/origin/*\n\n[...] \n> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n> get rid of the remote branch? Currently it seems like a bug introduced\n> by addition of wildcards refspecs, right?\n\nNo, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\nthe '-d' option removes branch locally. It is meant I think to remove \ntracking of branches which were dropped in remote, as I think that \nwildcard refspec does create new branches, but do not delete dropped \nbranches.\n\nSo I'm not sure if it is a bug, misfeature or a feature.\n\n\nCan anyone better versed in wildcard refspecs speak up, please?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"59677","messageId":"A919E788-C5D0-4404-95D4-869BAFE868AC@zib.de","threadId":"10845","inReplyTo":"200711131703.16357.jnareb@gmail.com","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-13T17:16:11Z","receivedAt":"2007-11-13T17:16:11Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 13, 2007, at 5:03 PM, Jakub Narebski wrote:\n\n> Sergei Organov <osv@javad.com> wrote:\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>>> Sergei Organov wrote:\n>\n>>>> I want to get rid of origin/pu remote tracking branch. What do I  \n>>>> do?\n>>>> I RTFM git-branch. What does it suggest?\n>>>>\n>>>> git branch -d -r origin/pu\n>>>>\n>>>> So far so good. However, it doesn't seem to work in practice:\n> [...]\n>>>> $ git branch -d -r origin/pu\n>>>> Deleted remote branch origin/pu.\n>>>> $ git remote show origin\n>>>> * remote origin\n>>>>   URL: git://git.kernel.org/pub/scm/git/git.git\n>>>>   Remote branch(es) merged with 'git pull' while on branch master\n>>>>     master\n>>>>   New remote branches (next fetch will store in remotes/origin)\n>>>>     pu\n>>>>   ^^^^^^^^^^^^^^^^^^^ What???\n>>>>   Tracked remote branches\n>>>>     html maint man master next todo\n>>>\n>>> Check out what do you have in .git/config file, in the\n>>> [remote \"origin\"] section. Most probably (if you cloned this\n>>> repository using new enough git) you have wildcard refspec there,\n>>> which means that git would pick all new branches when\n>>> fetching / pulling from given repository.\n>>\n>> Sure, I've cloned git.git using rather recent git, so .git/config  \n>> has:\n>>\n>>       fetch = +refs/heads/*:refs/remotes/origin/*\n>\n> [...]\n>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>> get rid of the remote branch? Currently it seems like a bug  \n>> introduced\n>> by addition of wildcards refspecs, right?\n>\n> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n> the '-d' option removes branch locally. It is meant I think to remove\n> tracking of branches which were dropped in remote, as I think that\n> wildcard refspec does create new branches, but do not delete dropped\n> branches.\n\n\"git remote prune origin\" should be used to clean up stale\nremote-tracking branches.\n\nBTW, what's the right name for this type of branch.\nI found \"tracking branch\", \"remote tracking branch\", and\n\"remote-tracking branch\" in the manual. The glossary only\nmentions \"tracking branch\".  Or is it a \"tracked remote branch\"\nas the output of \"git remote show\" suggests.  I remember,\nthere was a lengthy discussion on this issue.  Does someone\nremember the conclusion?\n\n\n> So I'm not sure if it is a bug, misfeature or a feature.\n\nIt doesn't make sense to delete remote-tracking branches\nlocally if they are still present at the remote.  The main\npurpose of a remote-tracking branch is to be identical to the\nreal remote branch.\n\nIn my opinion its a misfeature.  \"git remote prune\" does the\nsame in a sane way.\n\n\n\tSteffen\n"},{"id":"59679","messageId":"87prye832v.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"Pine.LNX.4.64.0711131600590.4362@racer.site","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T17:31:20Z","receivedAt":"2007-11-13T17:31:20Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Tue, 13 Nov 2007, Sergei Organov wrote:\n>\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> \n>> > The wildcard refspec is not documented adequately, so I'm not sure if \n>> > adding\n>> >\n>> >         fetch = !refs/heads/pu\n>> >\n>> > would help, or do you have to replace wildcard refspec by explicit \n>> > list of branches you want to fetch.\n>> \n>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>> get rid of the remote branch?\n>\n> But it did!  You explicitely fetched it _again_!\n\nSorry, but *I* didn't *explicitly* fetch it _again_!\n\n1. I cloned git.git repo making no custom steps.\n\n2. I decided I don't need to track some of branches.\n\n3. I tried to find in documentation a way to remove remote tracking\n   branch. I found that 'git branch -d -r' should do it.\n\n4. I used 'git branch -d -r origin/pu' to remove one of remote branches,\n   -- it succeeded.\n\n5. Some time later I ran 'git fetch', and it's *git fetch* that\n   *implicitly* fetched it _again_! When I say *implicitly* I mean that\n   I did nothing to tell 'fetch' to re-create the remote branch.\n\nPlease try to look at it from the *user* POV. A poor user that has no\nidea how all this is implemented internally and tries to use git\ndocumentation to do things.\n\n-- \nSergei.\n"},{"id":"59681","messageId":"87lk9282nr.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"200711131703.16357.jnareb@gmail.com","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T17:40:24Z","receivedAt":"2007-11-13T17:40:24Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n> Sergei Organov <osv@javad.com> wrote:\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>>> Sergei Organov wrote:\n>\n>>>> I want to get rid of origin/pu remote tracking branch. What do I do?\n>>>> I RTFM git-branch. What does it suggest?\n>>>> \n>>>> git branch -d -r origin/pu\n>>>> \n>>>> So far so good. However, it doesn't seem to work in practice:\n> [...]\n>>>> $ git branch -d -r origin/pu\n>>>> Deleted remote branch origin/pu.\n>>>> $ git remote show origin\n>>>> * remote origin\n>>>>   URL: git://git.kernel.org/pub/scm/git/git.git\n>>>>   Remote branch(es) merged with 'git pull' while on branch master\n>>>>     master\n>>>>   New remote branches (next fetch will store in remotes/origin)\n>>>>     pu\n>>>>   ^^^^^^^^^^^^^^^^^^^ What???  \n>>>>   Tracked remote branches\n>>>>     html maint man master next todo\n>>>\n>>> Check out what do you have in .git/config file, in the\n>>> [remote \"origin\"] section. Most probably (if you cloned this\n>>> repository using new enough git) you have wildcard refspec there,\n>>> which means that git would pick all new branches when\n>>> fetching / pulling from given repository. \n>> \n>> Sure, I've cloned git.git using rather recent git, so .git/config has:\n>> \n>>       fetch = +refs/heads/*:refs/remotes/origin/*\n>\n> [...] \n>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>> get rid of the remote branch? Currently it seems like a bug introduced\n>> by addition of wildcards refspecs, right?\n>\n> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n> the '-d' option removes branch locally. It is meant I think to remove \n> tracking of branches which were dropped in remote, as I think that \n> wildcard refspec does create new branches, but do not delete dropped \n> branches.\n\nIsn't it 'git remote prune <name>' that is meant to remove tracking of\nbranches which were dropped in remote?\n\nAnyway, description of '-r' in man git-branch:\n\n-r::\n\tList or delete (if used with -d) the remote-tracking branches.\n\nSuggests it should be deleted. What's a point to delete it if it will be\nre-created on next fetch anyway?\n\n> So I'm not sure if it is a bug, misfeature or a feature.\n>\n> Can anyone better versed in wildcard refspecs speak up, please?\n\nYes, please!\n\n-- \nSergei.\n"},{"id":"59680","messageId":"200711131842.03622.jnareb@gmail.com","threadId":"10845","inReplyTo":"A919E788-C5D0-4404-95D4-869BAFE868AC@zib.de","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-13T17:42:03Z","receivedAt":"2007-11-13T17:42:03Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Steffen Prohaska wrote:\n> On Nov 13, 2007, at 5:03 PM, Jakub Narebski wrote:\n>> Sergei Organov <osv@javad.com> wrote:\n\n>>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>>> get rid of the remote branch? Currently it seems like a bug  \n>>> introduced by addition of wildcards refspecs, right?\n>>\n>> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n>> the '-d' option removes branch locally. It is meant I think to remove\n>> tracking of branches which were dropped in remote, as I think that\n>> wildcard refspec does create new branches, but do not delete dropped\n>> branches.\n> \n> \"git remote prune origin\" should be used to clean up stale\n> remote-tracking branches.\n\n\"git remote prune <name>\" deletes _all_ stale tracking branches\nunder <name>. With \"git branch -d -r <branch>\" you can delete\n_single_ tracking branch.\n\n>> So I'm not sure if it is a bug, misfeature or a feature.\n> \n> It doesn't make sense to delete remote-tracking branches\n> locally if they are still present at the remote.  The main\n> purpose of a remote-tracking branch is to be identical to the\n> real remote branch.\n\nTrue, but it would be nice to have an option to _exclude_ some\nbranches from fetching (for example 'html' and 'man' branches\nof git.git), while still picking up new branches automatically\non fetch.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"59682","messageId":"87hcjq82ce.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"A919E788-C5D0-4404-95D4-869BAFE868AC@zib.de","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T17:47:13Z","receivedAt":"2007-11-13T17:47:13Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Steffen Prohaska <prohaska@zib.de> writes:\n[...]\n> It doesn't make sense to delete remote-tracking branches locally if\n> they are still present at the remote.  The main purpose of a\n> remote-tracking branch is to be identical to the real remote branch.\n\nBut I don't want to track those real remote branch anymore, so obviously\nI don't want anything that is \"identical\" to it, so deleting\ncorresponding remote-tracking branch makes perfect sense, IMHO.\n\n-- \nSergei.\n"},{"id":"59683","messageId":"87d4ue81tv.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"200711131842.03622.jnareb@gmail.com","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"","fromEmail":"osv@javad.com","sentAt":"2007-11-13T17:58:20Z","receivedAt":"2007-11-13T17:58:20Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n> Steffen Prohaska wrote:\n>> On Nov 13, 2007, at 5:03 PM, Jakub Narebski wrote:\n>>> Sergei Organov <osv@javad.com> wrote:\n>\n>>>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>>>> get rid of the remote branch? Currently it seems like a bug  \n>>>> introduced by addition of wildcards refspecs, right?\n>>>\n>>> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n>>> the '-d' option removes branch locally. It is meant I think to remove\n>>> tracking of branches which were dropped in remote, as I think that\n>>> wildcard refspec does create new branches, but do not delete dropped\n>>> branches.\n>> \n>> \"git remote prune origin\" should be used to clean up stale\n>> remote-tracking branches.\n>\n> \"git remote prune <name>\" deletes _all_ stale tracking branches\n> under <name>. With \"git branch -d -r <branch>\" you can delete\n> _single_ tracking branch.\n>\n>>> So I'm not sure if it is a bug, misfeature or a feature.\n>> \n>> It doesn't make sense to delete remote-tracking branches\n>> locally if they are still present at the remote.  The main\n>> purpose of a remote-tracking branch is to be identical to the\n>> real remote branch.\n>\n> True, but it would be nice to have an option to _exclude_ some\n> branches from fetching (for example 'html' and 'man' branches\n> of git.git), while still picking up new branches automatically\n> on fetch.\n\nGuys, could you please read man git-branch? What do you think this\nexample is doing?:\n\n<quote Documentation/git-branch.txt>\nDelete unneeded branch::\n+\n------------\n$ git clone git://git.kernel.org/.../git.git my.git\n$ cd my.git\n$ git branch -d -r origin/todo origin/html origin/man   <1>\n$ git branch -D test                                    <2>\n------------\n+\n<1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n</quote>\n\nThat's *exactly* what I did! And it *doesn't work*! Well, it does delete\nthe branches, but they are automagically re-created on the next fetch,\nso \"deleting\" them this way is useless.\n\n-- \nSergei.\n"},{"id":"59685","messageId":"8c5c35580711131017p451f831bqd928ef033c9a0e98@mail.gmail.com","threadId":"10845","inReplyTo":"87d4ue81tv.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-11-13T18:17:51Z","receivedAt":"2007-11-13T18:17:51Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On Nov 13, 2007 6:58 PM,  <osv@javad.com> wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> > Steffen Prohaska wrote:\n> >> It doesn't make sense to delete remote-tracking branches\n> >> locally if they are still present at the remote.  The main\n> >> purpose of a remote-tracking branch is to be identical to the\n> >> real remote branch.\n> >\n> > True, but it would be nice to have an option to _exclude_ some\n> > branches from fetching (for example 'html' and 'man' branches\n> > of git.git), while still picking up new branches automatically\n> > on fetch.\n>\n> Guys, could you please read man git-branch?\n\nI understand that the man-page could be confusing, the problem is that\nthese examples are quite old: they made more sense when git didn't\nsupport wildcards in refspecs.\n\nYou want an easy way to tell git to stop tracking the pu-branch. This\ncan be achieved by editing the [remote \"origin\"] section in\n.git/config: remove the fetch-line containing refs/heads/* and add one\nfetch line for each ref you'd like to track. But beware that you have\nto add any new branches which you would like to track in the same way\n(editing .git/config).\n\nThe reason git-branch -d -r doesn't do this automatically is probably\nthat nobody has seen a need for it to do so...\n\n--\nlarsh\n"},{"id":"59686","messageId":"Pine.LNX.4.64.0711131819490.4362@racer.site","threadId":"10845","inReplyTo":"87prye832v.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-13T18:21:18Z","receivedAt":"2007-11-13T18:21:18Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 13 Nov 2007, Sergei Organov wrote:\n\n> Sorry, but *I* didn't *explicitly* fetch it _again_!\n> \n> 1. I cloned git.git repo making no custom steps.\n\nWhich means that you wanted to track that repository.  Yes, the complete \nrepository.  Not a single branch.  Not all branches except a single one.\n\n> 2. I decided I don't need to track some of branches.\n\nThe you should have done that.  But that is different from \"I decided to \ndelete the tracking _branch_\".\n\nCiao,\nDscho\n"},{"id":"59687","messageId":"6D2FF44E-5D45-4341-B863-1C33C104D3EA@zib.de","threadId":"10845","inReplyTo":"87d4ue81tv.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-13T18:39:39Z","receivedAt":"2007-11-13T18:39:39Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 13, 2007, at 6:58 PM, <osv@javad.com> <osv@javad.com> wrote:\n\n>>>> So I'm not sure if it is a bug, misfeature or a feature.\n>>>\n>>> It doesn't make sense to delete remote-tracking branches\n>>> locally if they are still present at the remote.  The main\n>>> purpose of a remote-tracking branch is to be identical to the\n>>> real remote branch.\n>>\n>> True, but it would be nice to have an option to _exclude_ some\n>> branches from fetching (for example 'html' and 'man' branches\n>> of git.git), while still picking up new branches automatically\n>> on fetch.\n>\n> Guys, could you please read man git-branch? What do you think this\n> example is doing?:\n>\n> <quote Documentation/git-branch.txt>\n> Delete unneeded branch::\n> +\n> ------------\n> $ git clone git://git.kernel.org/.../git.git my.git\n> $ cd my.git\n> $ git branch -d -r origin/todo origin/html origin/man   <1>\n> $ git branch -D test                                    <2>\n> ------------\n> +\n> <1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n> </quote>\n>\n> That's *exactly* what I did! And it *doesn't work*! Well, it does  \n> delete\n> the branches, but they are automagically re-created on the next fetch,\n> so \"deleting\" them this way is useless.\n\nYes, it is useless. The man page should be fixed.\n\n\tSteffen\n"},{"id":"59689","messageId":"874pfq7zpg.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"Pine.LNX.4.64.0711131819490.4362@racer.site","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T18:44:11Z","receivedAt":"2007-11-13T18:44:11Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Tue, 13 Nov 2007, Sergei Organov wrote:\n>\n>> Sorry, but *I* didn't *explicitly* fetch it _again_!\n>> \n>> 1. I cloned git.git repo making no custom steps.\n>\n> Which means that you wanted to track that repository.  Yes, the complete \n> repository.  Not a single branch.  Not all branches except a single one.\n>\n>> 2. I decided I don't need to track some of branches.\n>\n> The you should have done that.\n\nI think I did my best to try to do that (basing my attempts on current\ngit documentation). Isn't it?\n\n> But that is different from \"I decided to delete the tracking\n> _branch_\".\n\nYes, but the question is *why*? Isn't it an obvious application of\ndeleting tracking branch? And, as I've already asked in another\nsub-thread of this one, what the following example in the man git-branch\nis supposed to achieve?:\n\n<quote Documentation/git-branch.txt>\nDelete unneeded branch::\n+\n------------\n$ git clone git://git.kernel.org/.../git.git my.git\n$ cd my.git\n$ git branch -d -r origin/todo origin/html origin/man   <1>\n$ git branch -D test                                    <2>\n------------\n+\n<1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n</quote>\n\nSorry, but I still believe that it's not me who needs fixing.\n\n-- \nSergei.\n"},{"id":"59695","messageId":"87zlxi6kf6.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"8c5c35580711131017p451f831bqd928ef033c9a0e98@mail.gmail.com","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-13T18:59:41Z","receivedAt":"2007-11-13T18:59:41Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"\"Lars Hjemli\" <hjemli@gmail.com> writes:\n\n> On Nov 13, 2007 6:58 PM,  <osv@javad.com> wrote:\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> > Steffen Prohaska wrote:\n>> >> It doesn't make sense to delete remote-tracking branches\n>> >> locally if they are still present at the remote.  The main\n>> >> purpose of a remote-tracking branch is to be identical to the\n>> >> real remote branch.\n>> >\n>> > True, but it would be nice to have an option to _exclude_ some\n>> > branches from fetching (for example 'html' and 'man' branches\n>> > of git.git), while still picking up new branches automatically\n>> > on fetch.\n>>\n>> Guys, could you please read man git-branch?\n>\n> I understand that the man-page could be confusing, the problem is that\n> these examples are quite old: they made more sense when git didn't\n> support wildcards in refspecs.\n\nYeah, I understand that. But there doesn't seem to be actual reason not\nto support them even with wildcards support.\n\n> You want an easy way to tell git to stop tracking the pu-branch. This\n> can be achieved by editing the [remote \"origin\"] section in\n> .git/config: remove the fetch-line containing refs/heads/* and add one\n> fetch line for each ref you'd like to track. But beware that you have\n> to add any new branches which you would like to track in the same way\n> (editing .git/config).\n\nThanks, I got it. Though the last sentence makes it less useful then it\nshould be. [This somewhat reminds me CVS problems when you can delete\ndirectories that you don't want, and checkout won't restore them\n(without special switch), but then you won't automatically get new\ndirectories :( Though admittedly the situation with the remote-tracking\nbranches is less annoying.]\n\n>\n> The reason git-branch -d -r doesn't do this automatically is probably\n> that nobody has seen a need for it to do so...\n\nMe thinks it has probably been just overlooked when wildcards were\nadded. Anyway, either documentation or git-branch -d -r should be fixed,\nI think.\n\n-- \nSergei.\n"},{"id":"59697","messageId":"200711132017.31352.jnareb@gmail.com","threadId":"10845","inReplyTo":"87lk9282nr.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-13T19:17:31Z","receivedAt":"2007-11-13T19:17:31Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Sergei Organov wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n>> Sergei Organov <osv@javad.com> wrote:\n>>> Jakub Narebski <jnareb@gmail.com> writes:\n>>>> Sergei Organov wrote:\n>>>>\n>>>>> I want to get rid of origin/pu remote tracking branch. What do I do?\n>>>>> I RTFM git-branch. What does it suggest?\n>>>>> \n>>>>> git branch -d -r origin/pu\n>>>>> \n>>>>> So far so good. However, it doesn't seem to work in practice:\n\n[...] \n>>>       fetch = +refs/heads/*:refs/remotes/origin/*\n>>\n>> [...] \n>>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>>> get rid of the remote branch? Currently it seems like a bug introduced\n>>> by addition of wildcards refspecs, right?\n>>\n>> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n>> the '-d' option removes branch locally. It is meant I think to remove \n>> tracking of branches which were dropped in remote, as I think that \n>> wildcard refspec does create new branches, but do not delete dropped \n>> branches.\n> \n> Isn't it 'git remote prune <name>' that is meant to remove tracking of\n> branches which were dropped in remote?\n> \n> Anyway, description of '-r' in man git-branch:\n> \n> -r::\n> \tList or delete (if used with -d) the remote-tracking branches.\n> \n> Suggests it should be deleted. What's a point to delete it if it will be\n> re-created on next fetch anyway?\n\nOnce more, with feeling.\n\nBy default now git creates on clone the configuration which essentially\nsays to fetch (get) all \"proper\" branches the remote has. (By \"proper\"\nI mean branches residing under 'refs/heads/'). That is what the wildcard\nspec above says.\n\nNow when the remote repository dropped some branch (branch was deleted\non remote), te corresponding local tracking branch (in\n'refs/remotes/origin') does not get deleted.\n\nYou can delete _all_ \"stale\" tracking branches, which means deleting\nall tracking branches for which corresponding tracked branches were\ndeleted on remote. Or you can delete _one_ specified tracking branch\nusing \"git branch -r -d\".\n\nNote that you told git to delete tracking branch, not to stop tracking\nall branches in remote (as in above wildcard regexp), or stop tracking\nsome branch (the configuration earlier version of git created on clone,\nwithout wildcard pathspec). So when you ask git to fetch from remote\nagain, it happily re-creates deleted branch. Note also that git *cannot*\ndistinguish (yet) between newly created branch on remote, and branch\nwhich tracking branch you have deleted, either by accident or on purpose.\n\nAs to documentation: <tongue in cheek> if you cannot distinguish\nbetween tracking branch and tracked branch then it is your damn fault\n;-PPPP </tongue in cheek>\n\n\nAnalogy: if you delete file in working area (git branch -d -r), and\ncheckout again (git fetch), the file will be resurected.\n\n>> So I'm not sure if it is a bug, misfeature or a feature.\n>>\n>> Can anyone better versed in wildcard refspecs speak up, please?\n> \n> Yes, please!\n\nI'm most interested if \"fetch = !refs/heads/branch\" or \n\"fetch = -refs/heads/branch\" works as a way to specify exclusions\nfrom refspec.\n\n\nP.S. Solution would be to use git-remote or ls-remote and some magic\nto generate full list of refspecs instead of wildcard refspec.\n\nP.P.S. We used to have similar problem with the introduction of\nwildcard refspec, namely: which branch from all fetched to merge :-)\n-- \nJakub Narebski\nPoland\n"},{"id":"59710","messageId":"473A027E.5000107@op5.se","threadId":"10845","inReplyTo":"A919E788-C5D0-4404-95D4-869BAFE868AC@zib.de","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-11-13T20:01:02Z","receivedAt":"2007-11-13T20:01:02Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Steffen Prohaska wrote:\n> \n> On Nov 13, 2007, at 5:03 PM, Jakub Narebski wrote:\n> \n>> Sergei Organov <osv@javad.com> wrote:\n>>> Jakub Narebski <jnareb@gmail.com> writes:\n>>>> Sergei Organov wrote:\n>>\n>>>>> I want to get rid of origin/pu remote tracking branch. What do I do?\n>>>>> I RTFM git-branch. What does it suggest?\n>>>>>\n>>>>> git branch -d -r origin/pu\n>>>>>\n>>>>> So far so good. However, it doesn't seem to work in practice:\n>> [...]\n>>>>> $ git branch -d -r origin/pu\n>>>>> Deleted remote branch origin/pu.\n>>>>> $ git remote show origin\n>>>>> * remote origin\n>>>>>   URL: git://git.kernel.org/pub/scm/git/git.git\n>>>>>   Remote branch(es) merged with 'git pull' while on branch master\n>>>>>     master\n>>>>>   New remote branches (next fetch will store in remotes/origin)\n>>>>>     pu\n>>>>>   ^^^^^^^^^^^^^^^^^^^ What???\n>>>>>   Tracked remote branches\n>>>>>     html maint man master next todo\n>>>>\n>>>> Check out what do you have in .git/config file, in the\n>>>> [remote \"origin\"] section. Most probably (if you cloned this\n>>>> repository using new enough git) you have wildcard refspec there,\n>>>> which means that git would pick all new branches when\n>>>> fetching / pulling from given repository.\n>>>\n>>> Sure, I've cloned git.git using rather recent git, so .git/config has:\n>>>\n>>>       fetch = +refs/heads/*:refs/remotes/origin/*\n>>\n>> [...]\n>>> Isn't \"git branch -d -r\" supposed to do whatever magic is required to\n>>> get rid of the remote branch? Currently it seems like a bug introduced\n>>> by addition of wildcards refspecs, right?\n>>\n>> No, the '-r' part translates 'pu' into 'refs/remotes/origin/pu', and\n>> the '-d' option removes branch locally. It is meant I think to remove\n>> tracking of branches which were dropped in remote, as I think that\n>> wildcard refspec does create new branches, but do not delete dropped\n>> branches.\n> \n> \"git remote prune origin\" should be used to clean up stale\n> remote-tracking branches.\n> \n> BTW, what's the right name for this type of branch.\n> I found \"tracking branch\", \"remote tracking branch\", and\n> \"remote-tracking branch\" in the manual. The glossary only\n> mentions \"tracking branch\".  Or is it a \"tracked remote branch\"\n> as the output of \"git remote show\" suggests.  I remember,\n> there was a lengthy discussion on this issue.  Does someone\n> remember the conclusion?\n> \n\nIt seems we agreed to disagree. However, a \"tracked remote branch\"\nis definitely not in your local repo. I think remote-tracking branch\ngrammatically is the most correct, as that's the only non-ambiguous\nform (remote tracking branch might mean \"remote tracking-branch\" or\n\"remote-tracking branch\"). It's also the only form that works when\nused with \"local\" in front of it. \"Tracked remote branch\" will\nalways be a \"remote branch\", no matter how you prefix it.\n\nI hate that part of git nomenclature with a passion. It's ambiguous\nat best and, as a consequence, downright wrong for some uses.\n\n> \n>> So I'm not sure if it is a bug, misfeature or a feature.\n> \n> It doesn't make sense to delete remote-tracking branches\n> locally if they are still present at the remote.  The main\n> purpose of a remote-tracking branch is to be identical to the\n> real remote branch.\n> \n\nYes, but it does make sense to say \"I no longer want to track that\nremote branch\". If that should be implied by the user deleting its\nlocal counterpart is, I think, what this discussion is about.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"59761","messageId":"473A262B.4010205@op5.se","threadId":"10845","inReplyTo":"473A027E.5000107@op5.se","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-11-13T22:33:15Z","receivedAt":"2007-11-13T22:33:15Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Andreas Ericsson wrote:\n> Steffen Prohaska wrote:\n>>\n>> BTW, what's the right name for this type of branch.\n>> I found \"tracking branch\", \"remote tracking branch\", and\n>> \"remote-tracking branch\" in the manual. The glossary only\n>> mentions \"tracking branch\".  Or is it a \"tracked remote branch\"\n>> as the output of \"git remote show\" suggests.  I remember,\n>> there was a lengthy discussion on this issue.  Does someone\n>> remember the conclusion?\n>>\n> \n> It seems we agreed to disagree. However, a \"tracked remote branch\"\n> is definitely not in your local repo. I think remote-tracking branch\n> grammatically is the most correct, as that's the only non-ambiguous\n> form (remote tracking branch might mean \"remote tracking-branch\" or\n> \"remote-tracking branch\"). It's also the only form that works when\n> used with \"local\" in front of it. \"Tracked remote branch\" will\n> always be a \"remote branch\", no matter how you prefix it.\n> \n> I hate that part of git nomenclature with a passion. It's ambiguous\n> at best and, as a consequence, downright wrong for some uses.\n> \n\nI confess myself corrected. The Documentation/glossary.txt file doesn't\nmention them at all. It does however describe \"tracking branch\", and\nmentions \"Pull: \" refspecs in the same sentence, indicating that that\nparticular description is a leftover from the pre-1.5 era.\n\nI've got half a patch ready to change all occurrences of anything but\n\"remote-tracking branch\" to that self-same description. This is what\nI've got in Documentation/glossary.txt so far:\n\n[[def_remote_tracking_branch]]remote-tracking branch:\n    A \"remote-tracking branch\" is a branch set up to track the\n    state of a branch in a remote repository which the user has named. \n    These branches follow exactly the same rules as the branches which\n    reside in the remote repository, except that they are manipulated\n    by `git fetch` instead of `git push`. That is, they can only be\n    updated if the update would result in a \n    <<def_fastforward,fast forward>>, or if the user supplies the \n    '--force' option. \n    They cannot be checked out or committed to by users, but serve\n    solely as local reference-pointers to their corresponding branches\n    in the remote repository.\n    The most common example of a remote-tracking branch is origin/master.\n\n\nIt's a bit long-winded. Anyone got any improvements?\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"59762","messageId":"200711132342.45280.jnareb@gmail.com","threadId":"10845","inReplyTo":"473A262B.4010205@op5.se","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-13T22:42:44Z","receivedAt":"2007-11-13T22:42:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Andreas Ericsson wrote:\n\n> This is what I've got in Documentation/glossary.txt so far:\n> \n> [[def_remote_tracking_branch]]remote-tracking branch:\n>     A \"remote-tracking branch\" is a branch set up to track the\n>     state of a branch in a remote repository which the user has named. \n>     These branches follow exactly the same rules as the branches which\n>     reside in the remote repository, except that they are manipulated\n>     by `git fetch` instead of `git push`. That is, they can only be\n>     updated if the update would result in a \n>     <<def_fastforward,fast forward>>, or if the user supplies the \n>     '--force' option. \n>     They cannot be checked out or committed to by users, but serve\n>     solely as local reference-pointers to their corresponding branches\n>     in the remote repository.\n>     The most common example of a remote-tracking branch is origin/master.\n\nIf user supplies '--force' option, ur uses '+<src>:<dst>' refspec\n('+<remote branch>:<remote-tracking branch>').\n \n> It's a bit long-winded. Anyone got any improvements?\n\nLong winded is good. Well, long is good.\n\n\nI would add that remote-tracking branches reside in refs/remotes/<remote>.\n\nI would skip the part about `git push`, and just say that they are\nupdated on fetch (`git fetch` or `git pull`).\n\n-- \nJakub Narebski\nPoland\n"},{"id":"59766","messageId":"20071113230505.GJ22590@fieldses.org","threadId":"10845","inReplyTo":"473A262B.4010205@op5.se","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-11-13T23:05:05Z","receivedAt":"2007-11-13T23:05:05Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Tue, Nov 13, 2007 at 11:33:15PM +0100, Andreas Ericsson wrote:\n> Andreas Ericsson wrote:\n>> Steffen Prohaska wrote:\n>>>\n>>> BTW, what's the right name for this type of branch.\n>>> I found \"tracking branch\", \"remote tracking branch\", and\n>>> \"remote-tracking branch\" in the manual. The glossary only\n>>> mentions \"tracking branch\".  Or is it a \"tracked remote branch\"\n>>> as the output of \"git remote show\" suggests.  I remember,\n>>> there was a lengthy discussion on this issue.  Does someone\n>>> remember the conclusion?\n>>>\n>>\n>> It seems we agreed to disagree. However, a \"tracked remote branch\"\n>> is definitely not in your local repo. I think remote-tracking branch\n>> grammatically is the most correct, as that's the only non-ambiguous\n>> form (remote tracking branch might mean \"remote tracking-branch\" or\n>> \"remote-tracking branch\"). It's also the only form that works when\n>> used with \"local\" in front of it. \"Tracked remote branch\" will\n>> always be a \"remote branch\", no matter how you prefix it.\n>>\n>> I hate that part of git nomenclature with a passion. It's ambiguous\n>> at best and, as a consequence, downright wrong for some uses.\n>>\n>\n> I confess myself corrected. The Documentation/glossary.txt file doesn't\n> mention them at all. It does however describe \"tracking branch\", and\n> mentions \"Pull: \" refspecs in the same sentence, indicating that that\n> particular description is a leftover from the pre-1.5 era.\n>\n> I've got half a patch ready to change all occurrences of anything but\n> \"remote-tracking branch\" to that self-same description. This is what\n> I've got in Documentation/glossary.txt so far:\n>\n> [[def_remote_tracking_branch]]remote-tracking branch:\n>    A \"remote-tracking branch\" is a branch set up to track the\n>    state of a branch in a remote repository which the user has named.    \n> These branches follow exactly the same rules as the branches which\n>    reside in the remote repository, except that they are manipulated\n>    by `git fetch` instead of `git push`. That is, they can only be\n>    updated if the update would result in a    <<def_fastforward,fast \n> forward>>, or if the user supplies the    '--force' option.\n\nThis is a little confusing--by default fetch does force updates.\n\n--b.\n\n> They cannot \n> be checked out or committed to by users, but serve\n>    solely as local reference-pointers to their corresponding branches\n>    in the remote repository.\n>    The most common example of a remote-tracking branch is origin/master.\n>\n>\n> It's a bit long-winded. Anyone got any improvements?\n>\n> -- \n> Andreas Ericsson                   andreas.ericsson@op5.se\n> OP5 AB                             www.op5.se\n> Tel: +46 8-230225                  Fax: +46 8-230231\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"59780","messageId":"7vr6itr96h.fsf@gitster.siamese.dyndns.org","threadId":"10845","inReplyTo":"473A262B.4010205@op5.se","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-13T23:56:54Z","receivedAt":"2007-11-13T23:56:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Ericsson <ae@op5.se> writes:\n\n> I've got half a patch ready to change all occurrences of anything but\n> \"remote-tracking branch\" to that self-same description. This is what\n> I've got in Documentation/glossary.txt so far:\n>\n> [[def_remote_tracking_branch]]remote-tracking branch:\n>    A \"remote-tracking branch\" is a branch set up to track the\n>    state of a branch in a remote repository which the user has named.\n> These branches follow exactly the same rules as the branches which\n>    reside in the remote repository, except that they are manipulated\n>    by `git fetch` instead of `git push`. That is, they can only be\n>    updated if the update would result in a  <<def_fastforward,fast\n> forward>>, or if the user supplies the  '--force' option.  They cannot\n> be checked out or committed to by users, but serve\n>    solely as local reference-pointers to their corresponding branches\n>    in the remote repository.\n>    The most common example of a remote-tracking branch is origin/master.\n\nPlease try to read it as if it were an entry in a glossary.\nThe sentence \"... follow exactly the same rules as ...\" was\n\"Huh?\" to me.  \"rules?  what rules?  the set of valid characters\nin their names?\"\n\nWhen branch 'foo' from remote is tracked with the standard layout\n(post 1.3.0) it is copied to refs/remotes/origin/foo and people\noften fork their local branch refs/heads/foo to build on top.\nThe use of the word \"corresonding\" feels a bit confusing,\nbecause you can arguably say refs/heads/foo at remote\ncorresopnds to refs/heads/foo in your repository.\n\nI'd drop \"These branches follow ... the '--force' option.  \"\nfrom the above.  The rules on how they are updated are\nirrelevant, before the reader understands what they are for.\nHow about this?\n\n    A \"remote tracking branch\" remembers which commit a branch\n    in the remote repository was pointing at last time you\n    checked.  It cannot be checked out or committed because its\n    purpose is to serve as a local reference point after you\n    built your own changes on top of it in your local branch\n    forked from it.  The most common example of a remote\n    tracking branch is \"origin/master\", which tracks the\n    \"master\" branch of the \"origin\" remote.\n\nBTW, when you have this data-flow (probably typical in a shared\nrepository workflow):\n\n    Remote repository               Your repository\n\n    refs/heads/foo -------(A)------> refs/remotes/origin/foo\n         ^                                |\n         |                               (B)\n         |                                |\n         |                                V\n         `-------------(C)---------- refs/heads/foo\n\n         (A) \"git fetch\" with remote.origin.fetch configuration\n             set to +refs/heads/*:refs/remotes/origin/* keeps\n             your refs/remotes/origin/foo up-to-date with their\n             refs/heads/foo\n\n         (B) \"git merge origin/foo\" while on \"foo\" branch (there\n             are few shorthands like \"git pull origin foo\" while\n             on \"foo\" branch.  If you say \"git branch --track\n             foo origin/foo\", then running \"git pull\" without\n             parameter while on \"foo\" branch).\n\n         (C) \"git push origin foo\".\n\n * Everybody seems to agree that \"refs/remotes/origin/foo\" is\n   called a \"remote tracking branch\";\n\n * Your refs/heads/foo follows and builds on top of 'foo' branch\n   at the remote.  Some people errorneously call it \"tracking\"\n   but that is because we do not have a good term for it;\n\n * There is no good name for \"refs/heads/foo at the remote\".  We\n   always say \"the remote branch you follow\" (or \"track\"). \n\n   \n"},{"id":"59797","messageId":"473A493C.4070902@op5.se","threadId":"10845","inReplyTo":"7vr6itr96h.fsf@gitster.siamese.dyndns.org","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-11-14T01:02:52Z","receivedAt":"2007-11-14T01:02:52Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Andreas Ericsson <ae@op5.se> writes:\n> \n>> I've got half a patch ready to change all occurrences of anything but\n>> \"remote-tracking branch\" to that self-same description. This is what\n>> I've got in Documentation/glossary.txt so far:\n>>\n>> [[def_remote_tracking_branch]]remote-tracking branch:\n>>    A \"remote-tracking branch\" is a branch set up to track the\n>>    state of a branch in a remote repository which the user has named.\n>> These branches follow exactly the same rules as the branches which\n>>    reside in the remote repository, except that they are manipulated\n>>    by `git fetch` instead of `git push`. That is, they can only be\n>>    updated if the update would result in a  <<def_fastforward,fast\n>> forward>>, or if the user supplies the  '--force' option.  They cannot\n>> be checked out or committed to by users, but serve\n>>    solely as local reference-pointers to their corresponding branches\n>>    in the remote repository.\n>>    The most common example of a remote-tracking branch is origin/master.\n> \n> Please try to read it as if it were an entry in a glossary.\n> The sentence \"... follow exactly the same rules as ...\" was\n> \"Huh?\" to me.  \"rules?  what rules?  the set of valid characters\n> in their names?\"\n> \n> When branch 'foo' from remote is tracked with the standard layout\n> (post 1.3.0) it is copied to refs/remotes/origin/foo and people\n> often fork their local branch refs/heads/foo to build on top.\n> The use of the word \"corresonding\" feels a bit confusing,\n> because you can arguably say refs/heads/foo at remote\n> corresopnds to refs/heads/foo in your repository.\n> \n> I'd drop \"These branches follow ... the '--force' option.  \"\n> from the above.  The rules on how they are updated are\n> irrelevant, before the reader understands what they are for.\n> How about this?\n> \n>     A \"remote tracking branch\" remembers which commit a branch\n>     in the remote repository was pointing at last time you\n>     checked.  It cannot be checked out or committed because its\n>     purpose is to serve as a local reference point after you\n>     built your own changes on top of it in your local branch\n>     forked from it.  The most common example of a remote\n>     tracking branch is \"origin/master\", which tracks the\n>     \"master\" branch of the \"origin\" remote.\n> \n\nI'd skip \"after you built your own changes ...\" and let it go at\nthat. Will amend. Thanks.\n\n> BTW, when you have this data-flow (probably typical in a shared\n> repository workflow):\n> \n>     Remote repository               Your repository\n> \n>     refs/heads/foo -------(A)------> refs/remotes/origin/foo\n>          ^                                |\n>          |                               (B)\n>          |                                |\n>          |                                V\n>          `-------------(C)---------- refs/heads/foo\n> \n>          (A) \"git fetch\" with remote.origin.fetch configuration\n>              set to +refs/heads/*:refs/remotes/origin/* keeps\n>              your refs/remotes/origin/foo up-to-date with their\n>              refs/heads/foo\n> \n>          (B) \"git merge origin/foo\" while on \"foo\" branch (there\n>              are few shorthands like \"git pull origin foo\" while\n>              on \"foo\" branch.  If you say \"git branch --track\n>              foo origin/foo\", then running \"git pull\" without\n>              parameter while on \"foo\" branch).\n> \n>          (C) \"git push origin foo\".\n> \n>  * Everybody seems to agree that \"refs/remotes/origin/foo\" is\n>    called a \"remote tracking branch\";\n> \n\nI'd like to insert the significant dash there. remote-tracking vs\nremote tracking. It solves the one ambiguity with it, and would\nfinally make it clear and consistent almost however it's used.\n\n>  * Your refs/heads/foo follows and builds on top of 'foo' branch\n>    at the remote.  Some people errorneously call it \"tracking\"\n>    but that is because we do not have a good term for it;\n> \n\n\"private tracking branch\"? Nah...\n\n>  * There is no good name for \"refs/heads/foo at the remote\".  We\n>    always say \"the remote branch you follow\" (or \"track\"). \n> \n\n\"remote-repo branch\" perhaps? The universe doesn't exactly toll its\nbells in approval at that, but at least it's not ambiguous.\n\nI've seen it written as \"remote tracking branch\" on irc a few times.\nIt causes 10 minutes of confusion where no-one's sure what anyone\nelse means. With the dash in there, there's no room for ambiguity.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"59814","messageId":"D1F72A32-2EE2-4CC9-AC0F-CDB3A261DEA7@zib.de","threadId":"10845","inReplyTo":"473A493C.4070902@op5.se","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-14T05:48:31Z","receivedAt":"2007-11-14T05:48:31Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 14, 2007, at 2:02 AM, Andreas Ericsson wrote:\n\n>> BTW, when you have this data-flow (probably typical in a shared\n>> repository workflow):\n>>     Remote repository               Your repository\n>>     refs/heads/foo -------(A)------> refs/remotes/origin/foo\n>>          ^                                |\n>>          |                               (B)\n>>          |                                |\n>>          |                                V\n>>          `-------------(C)---------- refs/heads/foo\n>>          (A) \"git fetch\" with remote.origin.fetch configuration\n>>              set to +refs/heads/*:refs/remotes/origin/* keeps\n>>              your refs/remotes/origin/foo up-to-date with their\n>>              refs/heads/foo\n>>          (B) \"git merge origin/foo\" while on \"foo\" branch (there\n>>              are few shorthands like \"git pull origin foo\" while\n>>              on \"foo\" branch.  If you say \"git branch --track\n>>              foo origin/foo\", then running \"git pull\" without\n>>              parameter while on \"foo\" branch).\n>>          (C) \"git push origin foo\".\n>>  * Everybody seems to agree that \"refs/remotes/origin/foo\" is\n>>    called a \"remote tracking branch\";\n>\n> I'd like to insert the significant dash there. remote-tracking vs\n> remote tracking. It solves the one ambiguity with it, and would\n> finally make it clear and consistent almost however it's used.\n\nI recently tried to explain it in the following way:\n\n\"refs/remotes/origin/foo\" mirrors the original branch (from the\nremote repository) in your local repository.  Because it is an\nidentical copy of the branch in the remote repository it is also\ncalled a \"remote-tracking branch\" or sometimes just a \"remote\nbranch\", although it is stored locally in your repository.\n\n\n>>  * Your refs/heads/foo follows and builds on top of 'foo' branch\n>>    at the remote.  Some people errorneously call it \"tracking\"\n>>    but that is because we do not have a good term for it;\n>\n> \"private tracking branch\"? Nah...\n\n\"refs/heads/foo\" is your local branch that you work\non.  Typically, it's simply called branch foo.  However you\ncan say \"my local branch\" foo to emphasis that it's your\nbranch.  This branch is set up in a way to automatically\nmerge changes from the remote branch it was created\nfrom.  It is sometimes said to \"track\" a remote branch,\nhowever it must not be confused with a \"remote-tracking\nbranch\".  The terminology used in the documentation is sometimes\nconfusing.  A clear statement is: \"My local branch foo\nis configured to automatically merge the remote (tracking)\nbranch origin/foo, with origin configured to point to\ngit://server/path/to/repo.git.\"\n\n\n>>  * There is no good name for \"refs/heads/foo at the remote\".  We\n>>    always say \"the remote branch you follow\" (or \"track\").\n>\n> \"remote-repo branch\" perhaps? The universe doesn't exactly toll its\n> bells in approval at that, but at least it's not ambiguous.\n\nTypically, the original branch in the remote repository and\nits local remote-tracking branch point to the same commit;\nor you can easy update the local copy with fetch.  So, often\nthey are not distinguished.  But you can say \"branch foo\nfrom the remote repository git://server/path/to/repo.git\"\nis mirrored locally as \"remote-tracking branch origin/foo\" if\nyou need to be precise.\n\nIf you say \"I merged origin/foo\" it really does not matter\nif you mean the branch in the remote repository or its local\nremote-tracking branch.  In both cases the reader needs context\nto understand what you exactly mean.  If you want to be precise\nhere, you can say \"I merged commit <sha1>\".\n\nA technical note: The '--track' option sets up the local\nbranch to track the original branch in the remote repository.\nThe setup is not referring to a local remote-tracking branch\nat all.  config.<branch>.merge contains the branch as it is\nnamed in the remote repository.  git is automatically merging\nfrom the branch in the remote repository.  The remote-tracking\nbranch would not be needed to do this.  So I think it's\nnot a problem that \"remote branch foo\" sometimes means the\nbranch in the remote repository and sometimes means its local\nremote-tracking branch.  What you really mean in both cases\nis the original branch in the remote repository.  If you want\nto explicitly point to a specific commit you need to name it\nby other means (sha1) anyway.\n\n\n> I've seen it written as \"remote tracking branch\" on irc a few times.\n> It causes 10 minutes of confusion where no-one's sure what anyone\n> else means. With the dash in there, there's no room for ambiguity.\n\nI believe dash is a good idea.\n\n\tSteffen\n"},{"id":"60152","messageId":"20071117165657.GC5198@efreet.light.src","threadId":"10845","inReplyTo":"874pfq7zpg.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-11-17T16:56:57Z","receivedAt":"2007-11-17T16:56:57Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Nov 13, 2007 at 21:44:11 +0300, Sergei Organov wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Hi,\n> >\n> > On Tue, 13 Nov 2007, Sergei Organov wrote:\n> >\n> >> Sorry, but *I* didn't *explicitly* fetch it _again_!\n> >> \n> >> 1. I cloned git.git repo making no custom steps.\n> >\n> > Which means that you wanted to track that repository.  Yes, the complete \n> > repository.  Not a single branch.  Not all branches except a single one.\n> >\n> >> 2. I decided I don't need to track some of branches.\n> >\n> > The you should have done that.\n> \n> I think I did my best to try to do that (basing my attempts on current\n> git documentation). Isn't it?\n> \n> > But that is different from \"I decided to delete the tracking\n> > _branch_\".\n> \n> Yes, but the question is *why*? Isn't it an obvious application of\n> deleting tracking branch?\n\nNo, it's not. Fetching has to bring you any heads that were newly created in\nthe remote repo. It can't tell whether a head is new since last fetch or you\njust for whatever reason didn't have the tracking branch before.\n\n> And, as I've already asked in another\n> sub-thread of this one, what the following example in the man git-branch\n> is supposed to achieve?:\n> \n> <quote Documentation/git-branch.txt>\n> Delete unneeded branch::\n> +\n> ------------\n> $ git clone git://git.kernel.org/.../git.git my.git\n> $ cd my.git\n> $ git branch -d -r origin/todo origin/html origin/man   <1>\n> $ git branch -D test                                    <2>\n> ------------\n> +\n> <1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n> </quote>\n> \n> Sorry, but I still believe that it's not me who needs fixing.\n\nThat documentation is precise. But it could maybe contain a footnote saying,\nthat if you remove a tracking branch, next fetch will create it again unless\nyou reconfigure it not to.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"60158","messageId":"20071117191256.GD5198@efreet.light.src","threadId":"10845","inReplyTo":"87d4ue81tv.fsf@osv.gnss.ru","subject":"Re: [Newbie] How to *actually* get rid of remote tracking branch?","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-11-17T19:12:56Z","receivedAt":"2007-11-17T19:12:56Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Nov 13, 2007 at 20:58:20 +0300, osv@javad.com wrote:\n> Guys, could you please read man git-branch? What do you think this\n> example is doing?:\n> \n> <quote Documentation/git-branch.txt>\n> Delete unneeded branch::\n> +\n> ------------\n> $ git clone git://git.kernel.org/.../git.git my.git\n> $ cd my.git\n> $ git branch -d -r origin/todo origin/html origin/man   <1>\n> $ git branch -D test                                    <2>\n> ------------\n> +\n> <1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n> </quote>\n> \n> That's *exactly* what I did! And it *doesn't work*! Well, it does delete\n> the branches, but they are automagically re-created on the next fetch,\n> so \"deleting\" them this way is useless.\n\nOf course it *does* work. It *deletes* the branches. There is not a single\nword about stopping fetch getting them!\n\nObviously given that the example is slightly contrived, it should really\nbe mentioned that it does not affect fetch at all.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"60161","messageId":"20071117195144.GF5198@efreet.light.src","threadId":"10845","inReplyTo":"20071117191256.GD5198@efreet.light.src","subject":"[PATCH] Improve description of git-branch -d and -D in man page.","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-11-17T19:51:44Z","receivedAt":"2007-11-17T19:51:44Z","isPatch":true,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"Some users expect that deleting a remote-tracking branch would prevent\nfetch from creating it again, so be explcit about that it's not the case.\nAlso be a little more explicit about what fully merged means.\n\nSigned-off-by: Jan Hudec <bulb@ucw.cz>\n---\n\nOn Sat, Nov 17, 2007 at 20:12:56 +0100, Jan Hudec wrote:\n> On Tue, Nov 13, 2007 at 20:58:20 +0300, osv@javad.com wrote:\n> > <quote Documentation/git-branch.txt>\n> > Delete unneeded branch::\n> > +\n> > ------------\n> > $ git clone git://git.kernel.org/.../git.git my.git\n> > $ cd my.git\n> > $ git branch -d -r origin/todo origin/html origin/man   <1>\n> > $ git branch -D test                                    <2>\n> > ------------\n> > +\n> > <1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n> > </quote>\n> > \n> > That's *exactly* what I did! And it *doesn't work*! Well, it does delete\n> > the branches, but they are automagically re-created on the next fetch,\n> > so \"deleting\" them this way is useless.\n> \n> Of course it *does* work. It *deletes* the branches. There is not a single\n> word about stopping fetch getting them!\n> \n> Obviously given that the example is slightly contrived, it should really\n> be mentioned that it does not affect fetch at all.\n\nWould this make the description obvious enough?\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n\n Documentation/git-branch.txt |   21 ++++++++++++++-------\n 1 files changed, 14 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt\nindex 5ce905d..f87b696 100644\n--- a/Documentation/git-branch.txt\n+++ b/Documentation/git-branch.txt\n@@ -45,17 +45,22 @@ to happen.\n \n With a `-d` or `-D` option, `<branchname>` will be deleted.  You may\n specify more than one branch for deletion.  If the branch currently\n-has a reflog then the reflog will also be deleted. Use -r together with -d\n-to delete remote-tracking branches.\n+has a reflog then the reflog will also be deleted.\n+\n+Use -r together with -d to delete remote-tracking branches. Note, that it\n+only makes sense to delete remote-tracking branches if they no longer exist\n+in remote repository or if gitlink:git-fetch[1] was configured not to fetch\n+them again. See also 'prune' subcommand of gitlink:git-remote[1] for way to\n+clean up all obsolete remote-tracking branches.\n \n \n OPTIONS\n -------\n -d::\n-\tDelete a branch. The branch must be fully merged.\n+\tDelete a branch. The branch must be fully merged in HEAD.\n \n -D::\n-\tDelete a branch irrespective of its index status.\n+\tDelete a branch irrespective of its merged status.\n \n -l::\n \tCreate the branch's reflog.  This activates recording of\n@@ -153,9 +158,11 @@ $ git branch -d -r origin/todo origin/html origin/man   <1>\n $ git branch -D test                                    <2>\n ------------\n +\n-<1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n-<2> Delete \"test\" branch even if the \"master\" branch does not have all\n-commits from test branch.\n+<1> Delete remote-tracking branches \"todo\", \"html\", \"man\". Next 'fetch' or\n+'pull' will create them again unless you configure them not to. See\n+gitlink:git-fetch[1].\n+<2> Delete \"test\" branch even if the \"master\" branch (or whichever branch is\n+currently checked out) does not have all commits from test branch.\n \n \n Notes\n-- \n1.5.3.5\n"},{"id":"60283","messageId":"877ike1s59.fsf@osv.gnss.ru","threadId":"10845","inReplyTo":"20071117195144.GF5198@efreet.light.src","subject":"Re: [PATCH] Improve description of git-branch -d and -D in man page.","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2007-11-19T09:49:54Z","receivedAt":"2007-11-19T09:49:54Z","isPatch":true,"sender":{"key":"osv@javad.com","avatar":null},"body":"Jan Hudec <bulb@ucw.cz> writes:\n> Some users expect that deleting a remote-tracking branch would prevent\n> fetch from creating it again, so be explcit about that it's not the case.\n> Also be a little more explicit about what fully merged means.\n>\n> Signed-off-by: Jan Hudec <bulb@ucw.cz>\n> ---\n>\n> On Sat, Nov 17, 2007 at 20:12:56 +0100, Jan Hudec wrote:\n>> On Tue, Nov 13, 2007 at 20:58:20 +0300, osv@javad.com wrote:\n>> > <quote Documentation/git-branch.txt>\n>> > Delete unneeded branch::\n>> > +\n>> > ------------\n>> > $ git clone git://git.kernel.org/.../git.git my.git\n>> > $ cd my.git\n>> > $ git branch -d -r origin/todo origin/html origin/man   <1>\n>> > $ git branch -D test                                    <2>\n>> > ------------\n>> > +\n>> > <1> Delete remote-tracking branches \"todo\", \"html\", \"man\"\n>> > </quote>\n>> > \n>> > That's *exactly* what I did! And it *doesn't work*! Well, it does delete\n>> > the branches, but they are automagically re-created on the next fetch,\n>> > so \"deleting\" them this way is useless.\n>> \n>> Of course it *does* work. It *deletes* the branches. There is not a single\n>> word about stopping fetch getting them!\n>> \n>> Obviously given that the example is slightly contrived, it should really\n>> be mentioned that it does not affect fetch at all.\n>\n> Would this make the description obvious enough?\n\nYes, I think now it describes the actual behavior much much better, --\nthanks.\n\n-- \nSergei.\n"}]}