{"thread":{"id":"30826","subject":"Push to a branch breaks origin, requires a manual gc to fix","startedAt":"2012-06-17T15:07:50Z","lastAt":"2012-06-20T20:10:49Z","messageCount":2,"participants":["Sam Varshavchik","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"193762","messageId":"CAMO9iftAP_QKDJwssvPhg0jm8MBjV3isCxKNuP0Ewf-X6kYtxQ@mail.gmail.com","threadId":"30826","inReplyTo":null,"subject":"Push to a branch breaks origin, requires a manual gc to fix","fromName":"Sam Varshavchik","fromEmail":"sam.varshavchik@gmail.com","sentAt":"2012-06-17T15:07:50Z","receivedAt":"2012-06-17T15:07:50Z","isPatch":false,"sender":{"key":"sam.varshavchik@gmail.com","avatar":null},"body":"Something's goes wrong every time I push a branch to origin.\n\nWhen I start, everything looks ok:\n\n$ git remote show origin\n* remote origin\n  Fetch URL: http://monster/gitrepos/stasher.git/\n  Push  URL: http://monster/gitrepos/stasher.git/\n  HEAD branch: master\n  Remote branches:\n    distreboot tracked\n    master     tracked\n  Local branches configured for 'git pull':\n    distreboot merges with remote distreboot\n    master     merges with remote master\n  Local refs configured for 'git push':\n    distreboot pushes to distreboot (fast-forwardable)\n    master     pushes to master     (up to date)\n\nI push:\n\n$ git push\nFetching remote heads...\n  refs/\n  refs/heads/\n  refs/tags/\nupdating 'refs/heads/distreboot'\n  from 0000000000000000000000000000000000000000\n  to   e0bce568272859eca817455acafb5f0a52b8fd5a\n    sending 6 objects\n    done\nUpdating remote server info\nTo http://monster/gitrepos/stasher.git/\n   6d4900e..e0bce56  distreboot -> distreboot\n\nThis breaks something:\n\n$ git remote show origin\n* remote origin\n  Fetch URL: http://monster/gitrepos/stasher.git/\n  Push  URL: http://monster/gitrepos/stasher.git/\n  HEAD branch: (unknown)\n  Remote branches:\n    distreboot                 tracked\n    refs/remotes/origin/master stale (use 'git remote prune' to remove)\n  Local branches configured for 'git pull':\n    distreboot merges with remote distreboot\n    master     merges with remote master\n  Local ref configured for 'git push':\n    distreboot pushes to distreboot (up to date)\n\nGoing forward, clone will fail:\n\n$ git clone http://monster/gitrepos/stasher.git/ stasher-test\nCloning into 'stasher-test'...\nwarning: remote HEAD refers to nonexistent ref, unable to checkout.\n\nIf I do some random fiddling in the origin repo (not really knowing\nwhat I'm doing, I can usually fix it:\n\nsh-4.2$ cat HEAD\nref: refs/heads/master\nsh-4.2$ ls -al refs/heads\ntotal 16\ndrwxr-xr-x 3 apache apache 4096 Jun 17 10:53 .\ndrwxr-xr-x 4 apache apache 4096 May 24 10:37 ..\ndrwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV\n-rw-r--r-- 1 apache apache   41 Jun 17 10:53 distreboot\nsh-4.2$ cat info/refs\ne0bce568272859eca817455acafb5f0a52b8fd5a\trefs/heads/distreboot\nsh-4.2$ git gc\nCounting objects: 124, done.\nDelta compression using up to 8 threads.\nCompressing objects: 100% (59/59), done.\nWriting objects: 100% (124/124), done.\nTotal 124 (delta 67), reused 116 (delta 63)\nsh-4.2$ cat info/refs\ne0bce568272859eca817455acafb5f0a52b8fd5a\trefs/heads/distreboot\nee94edb5fcdc7a28ffbdeaabe841e3ecff863983\trefs/heads/master\nsh-4.2$ ls -al refs/heads\ntotal 12\ndrwxr-xr-x 3 apache apache 4096 Jun 17 10:54 .\ndrwxr-xr-x 4 apache apache 4096 May 24 10:37 ..\ndrwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV\n\ngit clone starts working again.\n\nUntil I push the branch, and then master breaks again.\n"},{"id":"193992","messageId":"4FE22E49.4020400@gmail.com","threadId":"30826","inReplyTo":"CAMO9iftAP_QKDJwssvPhg0jm8MBjV3isCxKNuP0Ewf-X6kYtxQ@mail.gmail.com","subject":"Re: Push to a branch breaks origin, requires a manual gc to fix","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-06-20T20:10:49Z","receivedAt":"2012-06-20T20:10:49Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 6/17/2012 10:07 AM, Sam Varshavchik wrote:\n> Something's goes wrong every time I push a branch to origin.\n>\n> When I start, everything looks ok:\n>\n> $ git remote show origin\n> * remote origin\n>    Fetch URL: http://monster/gitrepos/stasher.git/\n>    Push  URL: http://monster/gitrepos/stasher.git/\n>    HEAD branch: master\n>    Remote branches:\n>      distreboot tracked\n>      master     tracked\n>    Local branches configured for 'git pull':\n>      distreboot merges with remote distreboot\n>      master     merges with remote master\n>    Local refs configured for 'git push':\n>      distreboot pushes to distreboot (fast-forwardable)\n>      master     pushes to master     (up to date)\n>\n> I push:\n>\n> $ git push\n> Fetching remote heads...\n>    refs/\n>    refs/heads/\n>    refs/tags/\n> updating 'refs/heads/distreboot'\n>    from 0000000000000000000000000000000000000000\n>    to   e0bce568272859eca817455acafb5f0a52b8fd5a\n>      sending 6 objects\n>      done\n> Updating remote server info\n> To http://monster/gitrepos/stasher.git/\n>     6d4900e..e0bce56  distreboot ->  distreboot\n>\n> This breaks something:\n>\n> $ git remote show origin\n> * remote origin\n>    Fetch URL: http://monster/gitrepos/stasher.git/\n>    Push  URL: http://monster/gitrepos/stasher.git/\n>    HEAD branch: (unknown)\n>    Remote branches:\n>      distreboot                 tracked\n>      refs/remotes/origin/master stale (use 'git remote prune' to remove)\n>    Local branches configured for 'git pull':\n>      distreboot merges with remote distreboot\n>      master     merges with remote master\n>    Local ref configured for 'git push':\n>      distreboot pushes to distreboot (up to date)\n>\n> Going forward, clone will fail:\n>\n> $ git clone http://monster/gitrepos/stasher.git/ stasher-test\n> Cloning into 'stasher-test'...\n> warning: remote HEAD refers to nonexistent ref, unable to checkout.\n>\n> If I do some random fiddling in the origin repo (not really knowing\n> what I'm doing, I can usually fix it:\n>\n> sh-4.2$ cat HEAD\n> ref: refs/heads/master\n> sh-4.2$ ls -al refs/heads\n> total 16\n> drwxr-xr-x 3 apache apache 4096 Jun 17 10:53 .\n> drwxr-xr-x 4 apache apache 4096 May 24 10:37 ..\n> drwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV\n> -rw-r--r-- 1 apache apache   41 Jun 17 10:53 distreboot\n> sh-4.2$ cat info/refs\n> e0bce568272859eca817455acafb5f0a52b8fd5a\trefs/heads/distreboot\n> sh-4.2$ git gc\n> Counting objects: 124, done.\n> Delta compression using up to 8 threads.\n> Compressing objects: 100% (59/59), done.\n> Writing objects: 100% (124/124), done.\n> Total 124 (delta 67), reused 116 (delta 63)\n> sh-4.2$ cat info/refs\n> e0bce568272859eca817455acafb5f0a52b8fd5a\trefs/heads/distreboot\n> ee94edb5fcdc7a28ffbdeaabe841e3ecff863983\trefs/heads/master\n> sh-4.2$ ls -al refs/heads\n> total 12\n> drwxr-xr-x 3 apache apache 4096 Jun 17 10:54 .\n> drwxr-xr-x 4 apache apache 4096 May 24 10:37 ..\n> drwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV\n>\n> git clone starts working again.\n>\n> Until I push the branch, and then master breaks again.\n\ni don't use http with git, but have you looked at git-config manpage and \nsearched for http?  i know i've heard http has extra considerations. \nThe version of git you are using may be important info also.  there is \nsomething in git-config about unclonability problems with older git \nversions.\n\nv/r,\nneal\n"}]}