[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Obscure error/warning/information message from git pull
From: |
Tassilo Horn |
Subject: |
Re: Obscure error/warning/information message from git pull |
Date: |
Fri, 14 Nov 2014 14:10:15 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
Hi Alan,
> I have two repositories in directories named .../master and
> .../emacs-24, the second having been cloned from the first.
I'm no git super-expert, but using
git clone address@hidden:/srv/git/emacs.git
I got a clone of the official repo containing all branches with the
master branch being current. Then I did
cd emacs
git checkout emacs-24
cd ..
git clone emacs emacs-24
which gave me a new directory emacs-24 that automatically tracks the
emacs-24 branch so that I can pull/push in there. However, now the
origin remote is the directory ../emacs, not savannah, so pulling/
pushing works with that, not upstream on savannah. So I changed
emacs-24/.git/config from
--8<---------------cut here---------------start------------->8---
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = /home/horn/Repos/el/emacs
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "emacs-24"]
remote = origin
merge = refs/heads/emacs-24
--8<---------------cut here---------------end--------------->8---
to
--8<---------------cut here---------------start------------->8---
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = address@hidden:/srv/git/emacs.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "emacs-24"]
remote = origin
merge = refs/heads/emacs-24
--8<---------------cut here---------------end--------------->8---
Well, the result was that another "git pull" downloaded quite some
stuff, so now I also have all branches available also in emacs-24. I
think I should have set the fetch ref-spec to emacs-24 instead of *
above... Who knows. But still my emacs-24 dir is only 364M whereas the
emacs dir I cloned from savannah is 619M.
Anyway, now I did
cd ../emacs
git checkout master
so that I have the master branch in emacs/ and the emacs-24 branch in
emacs-24/. Pulling works in both, pushing untested so far (but I'm
pretty sure it'll do the trick).
> glossary), but not what "the remote" means (is it referring to the
> .../master repository, or is it something within .../emacs-24?).
The remotes are the servers you are pulling/pushing with. The origin
remote is the one you initially cloned from, i.e., savannah. It can
also be a directory if you did "git clone path/to/emacs
path/to/emacs-foo".
> What about "but no such ref was fetched"? Fetched from where? From
> the .../master repository, perhaps?
I guess your problem is that "git clone dir1 dir2" doesn't create a full
copy of all branches but only the branch that was current in dir1 which
is probably master in your case. That's why I've switched to emacs-24
before cloning in my receipe above.
> Then I wanted to list only those those commits in the emacs-24 branch.
> Ha! "git help log" was of no help. It goes into a man page, and
> there is nothing helpful there thus to restrict the display. There
> appears not to be an option such as "-b emacs-24". There is a
> "--branches" option, but what that is supposed to do is completely
> opaque to me. How do I do what I want, here?
Probably, "git checkout emacs-24 && git log".
HTH,
Tassilo
- Obscure error/warning/information message from git pull, Alan Mackenzie, 2014/11/14
- Re: Obscure error/warning/information message from git pull,
Tassilo Horn <=
- Re: Obscure error/warning/information message from git pull, Andreas Schwab, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Andrew Burgess, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Alan Mackenzie, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Andreas Schwab, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Alan Mackenzie, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Christoph, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Andreas Schwab, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Alan Mackenzie, 2014/11/14
- Re: Obscure error/warning/information message from git pull, Tassilo Horn, 2014/11/15
- Re: Obscure error/warning/information message from git pull, Florian Weimer, 2014/11/15