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

Re: Git branch

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 13, 2010, 23:04 UTC
Message-ID
<20100713230418.GA1818@burratino>
In-Reply-To
<1279061452603-5290193.post@n2.nabble.com>
Hi,
jhapk wrote:
Show 10 quoted lines
> I manually enter the following lines in
> the .git/config files of A1 and A2
> [branch "branchA"]
>     remote = origin
>     merge = refs/heads/branchA
> 
> Then I create a branch in the bare repository B called branchA. Once this is
> done, all the push and pull works smoothly between the two repositories. 
> 
> Just wondering, is there a better way to do this? :)
Maybe something like the following would work.
>From A1:
  git checkout -b branchA
  ... hack hack hack ...
  git push --set-upstream origin branchA
  ssh A2
>From A2:
  git checkout -t origin/branchA
Previous: jhapk
Message 2 of 2 in “Git branch”
  1. jhapkJul 13, 2010
  2. Jonathan NiederJul 13, 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.