git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git fetch vs push, git am questions

From
KKKonstantin Kivi <kkivi@yandex.ru>
Date
Dec 7, 2010, 12:31 UTC
Message-ID
<60371291725083@web106.yandex.ru>
In-Reply-To
<20101207002104.GG3264@localhost.localdomain>
07.12.10, 03:21, "Konstantin Khomoutov" <flatworm@users.sourceforge.net>:
>  `git pull` does exactly that: fetch + merge (which should result in
>  fast-forward in your case).
pull does not work on bare repos.
>  > I also found that there is a notions of current branch in bare repository
> >  How can I change current branch in bare repositry?

I think I will understand things better if I get what is 'current branch' for bare repository and how to change it

>  By re-writing the HEAD ref (this behaviour is documented in the man page
>  of the `git clone` command, see the "--branch" option for instance).
The repository already exists, so git-clone  will not help
>  You can use the `git symbolic-ref` to update the HEAD ref.
>  

Do you mean something like git symbolic-ref master origin/master ?

Show 7 quoted lines
>  [...]
>  
>  P.S.
>  It's a bit strange you're playing with a bare repository in this way.
>  Usually a bare repository is supposed to be pushed to and pulled from,
>  not the other way round. Not that it's bad, but it may turn out you're
>  inventing a convoluted workflow when there may be a simpler solution.
Yes, I see that push is easier, I only want to be sure I have full control on what is going on.
-- 
С уважением, Константин Киви
Previous: Konstantin KhomoutovNext: Konstantin Khomoutov
Message 3 of 5 in “git fetch vs push, git am questions”
  1. Konstantin KiviDec 6, 2010
  2. Konstantin KhomoutovDec 7, 2010
  3. Konstantin KiviDec 7, 2010
  4. Konstantin KhomoutovDec 9, 2010
  5. Neal KreitzingerDec 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.