{"thread":{"id":"40850","subject":"Remote reference deleted on git fetch","startedAt":"2015-11-21T15:24:20Z","lastAt":"2015-11-21T15:24:20Z","messageCount":1,"participants":["Peter van der Does"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"273580","messageId":"56508CA4.9080403@gmail.com","threadId":"40850","inReplyTo":null,"subject":"Remote reference deleted on git fetch","fromName":"Peter van der Does","fromEmail":"pvanderdoes@gmail.com","sentAt":"2015-11-21T15:24:20Z","receivedAt":"2015-11-21T15:24:20Z","isPatch":false,"sender":{"key":"pvanderdoes@gmail.com","avatar":null},"body":"Hi,\n\nI have enabled fetch.prune and when I do a push of an existing branch\nand fetch that branch the remote reference is deleted. Is this a bug or\nexpected behavior?\n\nDoing the following commands on an existing repository:\n$ git config fetch.prune true\n$ git checkout -b bug/bug-1\nSwitched to a new branch 'bug/bug-1'\n$ touch bugfix\n$ git add .\n$ git commit -a\n$ git push --set-upstream origin bug/bug-1\nCounting objects: 2, done.\nDelta compression using up to 8 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (2/2), 242 bytes | 0 bytes/s, done.\nTotal 2 (delta 1), reused 0 (delta 0)\nTo git@github.com:petervanderdoes/Testing.git\n * [new branch]      bug/bug-1 -> bug/bug-1\nBranch bug/bug-1 set up to track remote branch bug/bug-1 from origin.\n$ git fetch origin bug/bug-1:refs/remotes/origin/bug/bug-1\n>From github.com:petervanderdoes/Testing\n x [deleted]         (none)     -> origin/bug/bug-1\n$ git branch -r\n  origin/master\n$ git branch\n* bug/bug-1\n  master\n\nThe branch still exists on the remote repository.\nIs it correct that the git fetch deletes the remote reference?\n\n\nPeter\n\n-- \nPeter van der Does\n\nGPG key: CB317D6E\n\nSite: http://avirtualhome.com\nGitHub: https://github.com/petervanderdoes\nTwitter: @petervanderdoes\n"}]}