mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] using git


From: Chris Hanson
Subject: Re: [MIT-Scheme-devel] using git
Date: Fri, 4 Sep 2009 21:36:30 -0700

According to the "git magic" site, most git commands don't work as
expected on bare repos.  You need to use --git-dir or --bare, which
are global git options (see "man git").  The usage, afaict, is either

    git pull --git-dir=..../stage.git

or alternatively

    cd ..../stage.git; git pull --bare

I think git push works similarly.  You shouldn't have to specify where
to push or pull, when the repo was created with git clone; that
information is supposed to be stored in ..../stage.git/config.  For
reference, I've attached the .git/config from my tree.

On Fri, Sep 4, 2009 at 8:42 PM, Taylor R Campbell<address@hidden> wrote:
> I think I can guess what the problem is: because the staging
> repository is a bare repository, `git pull' and `git merge' don't
> work, because there's no working tree.  (That is a wild guess -- I see
> no text in the git-pull(1), git-fetch(1), or git-merge(1) man pages
> about bare repositories -- but this sounds plausible to me.)  However,
> there are upstream changes, which `git push' won't let me clobber.  So
> I can't pull changes, and I can't push changes until I've pulled the
> changes, and I'm not sure what I can do now.
>
> I tried pulling directly into my working repository, and Git couldn't
> figure out what branch to use, which puzzles me, because as far as I
> know there is only one branch at all involved:
>
> \begin{transcript}
> % git pull ssh://git.sv.gnu.org/srv/git/mit-scheme.git
> You asked me to pull without telling me which branch you
> want to merge with, and 'branch.master.merge' in
> your configuration file does not tell me either.        Please
> specify which branch you want to merge on the command line and
> try again (e.g. 'git pull <repository> <refspec>').
> See git-pull(1) for details.
>
> If you often merge with the same branch, you may want to
> configure the following variables in your configuration
> file:
>
>    branch.master.remote = <nickname>
>    branch.master.merge = <remote-ref>
>    remote.<nickname>.url = <url>
>    remote.<nickname>.fetch = <refspec>
>
> See git-config(1) for details.
> \end{transcript}
>
> How do I know what branch to use?  As far as I know, there is only one
> branch in the repository, called `master' or `HEAD' or something, and
> it seems that Git already knows about `master' since it talked about
> it in the output of `git pull'.
>

Attachment: config
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]