All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: Sam Varshavchik <sam.varshavchik@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Push to a branch breaks origin, requires a manual gc to fix
Date: Wed, 20 Jun 2012 15:10:49 -0500	[thread overview]
Message-ID: <4FE22E49.4020400@gmail.com> (raw)
In-Reply-To: <CAMO9iftAP_QKDJwssvPhg0jm8MBjV3isCxKNuP0Ewf-X6kYtxQ@mail.gmail.com>

On 6/17/2012 10:07 AM, Sam Varshavchik wrote:
> Something's goes wrong every time I push a branch to origin.
>
> When I start, everything looks ok:
>
> $ git remote show origin
> * remote origin
>    Fetch URL: http://monster/gitrepos/stasher.git/
>    Push  URL: http://monster/gitrepos/stasher.git/
>    HEAD branch: master
>    Remote branches:
>      distreboot tracked
>      master     tracked
>    Local branches configured for 'git pull':
>      distreboot merges with remote distreboot
>      master     merges with remote master
>    Local refs configured for 'git push':
>      distreboot pushes to distreboot (fast-forwardable)
>      master     pushes to master     (up to date)
>
> I push:
>
> $ git push
> Fetching remote heads...
>    refs/
>    refs/heads/
>    refs/tags/
> updating 'refs/heads/distreboot'
>    from 0000000000000000000000000000000000000000
>    to   e0bce568272859eca817455acafb5f0a52b8fd5a
>      sending 6 objects
>      done
> Updating remote server info
> To http://monster/gitrepos/stasher.git/
>     6d4900e..e0bce56  distreboot ->  distreboot
>
> This breaks something:
>
> $ git remote show origin
> * remote origin
>    Fetch URL: http://monster/gitrepos/stasher.git/
>    Push  URL: http://monster/gitrepos/stasher.git/
>    HEAD branch: (unknown)
>    Remote branches:
>      distreboot                 tracked
>      refs/remotes/origin/master stale (use 'git remote prune' to remove)
>    Local branches configured for 'git pull':
>      distreboot merges with remote distreboot
>      master     merges with remote master
>    Local ref configured for 'git push':
>      distreboot pushes to distreboot (up to date)
>
> Going forward, clone will fail:
>
> $ git clone http://monster/gitrepos/stasher.git/ stasher-test
> Cloning into 'stasher-test'...
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
>
> If I do some random fiddling in the origin repo (not really knowing
> what I'm doing, I can usually fix it:
>
> sh-4.2$ cat HEAD
> ref: refs/heads/master
> sh-4.2$ ls -al refs/heads
> total 16
> drwxr-xr-x 3 apache apache 4096 Jun 17 10:53 .
> drwxr-xr-x 4 apache apache 4096 May 24 10:37 ..
> drwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV
> -rw-r--r-- 1 apache apache   41 Jun 17 10:53 distreboot
> sh-4.2$ cat info/refs
> e0bce568272859eca817455acafb5f0a52b8fd5a	refs/heads/distreboot
> sh-4.2$ git gc
> Counting objects: 124, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (59/59), done.
> Writing objects: 100% (124/124), done.
> Total 124 (delta 67), reused 116 (delta 63)
> sh-4.2$ cat info/refs
> e0bce568272859eca817455acafb5f0a52b8fd5a	refs/heads/distreboot
> ee94edb5fcdc7a28ffbdeaabe841e3ecff863983	refs/heads/master
> sh-4.2$ ls -al refs/heads
> total 12
> drwxr-xr-x 3 apache apache 4096 Jun 17 10:54 .
> drwxr-xr-x 4 apache apache 4096 May 24 10:37 ..
> drwxr-xr-x 2 apache apache 4096 Jun 17 10:53 .DAV
>
> git clone starts working again.
>
> Until I push the branch, and then master breaks again.

i don't use http with git, but have you looked at git-config manpage and 
searched for http?  i know i've heard http has extra considerations. 
The version of git you are using may be important info also.  there is 
something in git-config about unclonability problems with older git 
versions.

v/r,
neal

      reply	other threads:[~2012-06-20 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 15:07 Push to a branch breaks origin, requires a manual gc to fix Sam Varshavchik
2012-06-20 20:10 ` Neal Kreitzinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE22E49.4020400@gmail.com \
    --to=nkreitzinger@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sam.varshavchik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.