{"thread":{"id":"23181","subject":"Deleting remote branches","startedAt":"2010-03-26T05:46:55Z","lastAt":"2010-03-26T15:52:32Z","messageCount":6,"participants":["jhapk","Ramkumar Ramachandra","Peter Baumann","Johannes Sixt","Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137825","messageId":"1269582415273-4802262.post@n2.nabble.com","threadId":"23181","inReplyTo":null,"subject":"Deleting remote branches","fromName":"jhapk","fromEmail":"pradeep.kumar.jha@gmail.com","sentAt":"2010-03-26T05:46:55Z","receivedAt":"2010-03-26T05:46:55Z","isPatch":false,"sender":{"key":"pradeep.kumar.jha@gmail.com","avatar":null},"body":"\nHi,\n\nI had a whole bunch of branches in my local and a remote repository. I\ndeleted all the redundant branches to be left with only three now. So the\nresult of $git branch on my local repository is\n[pradeep@scaramanga cffc]$ git branch\n  jeff\n  master\n* work\nand on the remote directory which is called 'origin' it returns\n[pradeep@scaramanga CFFC.git]$ git branch\n  RANSmodel\n* master\n  work\nBut when I type the following command on my local branch, \n[pradeep@scaramanga cffc]$ git branch -a\n  jeff\n  master\n* work\n  origin/HEAD\n  origin/RANSmodel\n  origin/bluffbody\n  origin/counterflow\n  origin/flamelet\n  origin/jeff\n  origin/master\n  origin/test\n  origin/work\nI still get all these branches which I deleted in my remote 'origin'.\n\nMy .git/config file looks like this\n[core]\n        repositoryformatversion = 0\n        filemode = true\n        bare = false\n        logallrefupdates = true\n[remote \"origin\"]\n        url = /nfs/carv/d1/people/pradeep/Repositories/CFFC.git\n        fetch = +refs/heads/*:refs/remotes/origin/*\n[remote \"jeff\"]\n        url = /nfs/kris/d1/people/jeff/cffc\n        fetch = +refs/heads/pradeep:refs/remotes/jeff/pradeep\n[branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n[branch \"work\"]\n        remote = origin\n        merge = refs/heads/work\n[push]\n        default = matching\n[branch \"jeff\"]\n        remote = jeff\n        merge = refs/heads/pradeep\n\nDoes anyone know why am I still getting branhces like origin/test when I do\n$git branch -a\n-- \nView this message in context: http://n2.nabble.com/Deleting-remote-branches-tp4802262p4802262.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"137827","messageId":"f3271551003252300u387f6081seaa03d4eb7194486@mail.gmail.com","threadId":"23181","inReplyTo":"1269582415273-4802262.post@n2.nabble.com","subject":"Re: Deleting remote branches","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-03-26T06:00:49Z","receivedAt":"2010-03-26T06:00:49Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"See `git push origin :branchname`. It's a listed example in git-push (1).\n\n-- Ram\n"},{"id":"137828","messageId":"1269583743012-4802313.post@n2.nabble.com","threadId":"23181","inReplyTo":"f3271551003252300u387f6081seaa03d4eb7194486@mail.gmail.com","subject":"Re: Deleting remote branches","fromName":"jhapk","fromEmail":"pradeep.kumar.jha@gmail.com","sentAt":"2010-03-26T06:09:03Z","receivedAt":"2010-03-26T06:09:03Z","isPatch":false,"sender":{"key":"pradeep.kumar.jha@gmail.com","avatar":null},"body":"\nHi,\n\nI have tried that and I get the following message\n\n[pradeep@scaramanga cffc]$ git push origin:test\nerror: dst refspec test does not match any existing ref on the remote and\ndoes not start with refs/.\nfatal: The remote end hung up unexpectedly\nerror: failed to push to '/nfs/carv/d1/people/pradeep/Repositories/CFFC.git'\n\ndon't know what this means.\n-- \nView this message in context: http://n2.nabble.com/Deleting-remote-branches-tp4802262p4802313.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"137829","messageId":"20100326061652.GA28279@m62s10.vlinux.de","threadId":"23181","inReplyTo":"1269583743012-4802313.post@n2.nabble.com","subject":"Re: Deleting remote branches","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2010-03-26T06:16:52Z","receivedAt":"2010-03-26T06:16:52Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Thu, Mar 25, 2010 at 10:09:03PM -0800, jhapk wrote:\n> \n> Hi,\n> \n> I have tried that and I get the following message\n> \n> [pradeep@scaramanga cffc]$ git push origin:test\n                                      ^^^^^^^^^^^\n\nNotice the missing space. From the git push manpage:\n\ngit push origin :experimental\n               ^\n    Find a ref that matches experimental in the origin repository (e.g.\n    refs/heads/experimental), and delete it.\n\n\nThe syntax (with all the unused stuff removed) is 'git push <repository> <refspec>'\nIf you don't supply any repository (as you did with your cmdline), the default \nremote repository is used. Your command tried to push the local branch 'origin' into\nthe remote branch 'test' of your default remote repository. Correct would be\n\ngit push :test   # or git push origin :test\n\nThe refspec :test means push empy/nothingness into the branch 'test', which will delete it.\n\n--\nPeter\n"},{"id":"137832","messageId":"4BAC5DD1.7050500@viscovery.net","threadId":"23181","inReplyTo":"1269582415273-4802262.post@n2.nabble.com","subject":"Re: Deleting remote branches","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-03-26T07:10:09Z","receivedAt":"2010-03-26T07:10:09Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 3/26/2010 6:46, schrieb jhapk:\n> I had a whole bunch of branches in my local and a remote repository. I\n> deleted all the redundant branches to be left with only three now.\n...\n> Does anyone know why am I still getting branhces like origin/test when I do\n> $git branch -a\n\ngit remote prune origin\n\n-- Hannes\n"},{"id":"137869","messageId":"a038bef51003260852x204500fv8db7dd7a42516050@mail.gmail.com","threadId":"23181","inReplyTo":"1269582415273-4802262.post@n2.nabble.com","subject":"Re: Deleting remote branches","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-03-26T15:52:32Z","receivedAt":"2010-03-26T15:52:32Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Thu, Mar 25, 2010 at 10:46 PM, jhapk <pradeep.kumar.jha@gmail.com> wrote:\n>\n> Hi,\n>\n>  jeff\n>  master\n> * work\n>  origin/HEAD\n>  origin/RANSmodel\n>  origin/bluffbody\n>  origin/counterflow\n>  origin/flamelet\n>  origin/jeff\n>  origin/master\n>  origin/test\n>  origin/work\n> I still get all these branches which I deleted in my remote 'origin'.\n>\n\n'git remote prune origin' will clean up the references you have to\nbranches that no longer exist in origin\n"}]}