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

git fetch vs push, git am questions

From
KKKonstantin Kivi <kkivi@yandex.ru>
Date
Dec 6, 2010, 20:27 UTC
Message-ID
<99351291667275@web152.yandex.ru>
HI all
I honestly tried to find answers in various docs/books about git and failed, so I have to ask here.
 
1) Is it possible to achieve the same result with git fetch, as I have with git push. I have cloned a bare repository (2) from my repository (1) and 
I want fetch made in (2) get all info contained in (1) . I talk only about 'master' here. git push from (1) to (2) does the job, but git fetch in (1) updates only origin/master, and not master.
I also found that there is a notions of current branch in bare repository (master in my case), that stops my experiments of deleting master and making new master out of origin/master.
How can I change current branch in bare repositry?
 
2) I read that git rebase used 'git am' internally. How can  force git am/apply to create conflicts like rebase does in form
 
<<<<<<old
dksjfd
========
>>>>>jfkjdfkd
 
instead of *.rej files 
Best regard, Konstantin
Next: Konstantin Khomoutov
Message 1 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.