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

pushing remote branches

From
Lorenzo Bettini <bettini@dsi.unifi.it>
Date
Nov 14, 2009, 23:37 UTC
Message-ID
<hdneuv$nc8$2@ger.gmane.org>
Hi

I recently started to use git, and I experienced problems with branches: on my machine I did (on an already cloned repo)

git checkout -b experiments origin/experiments
and thus my config reads
[remote "origin"]
         fetch = +refs/heads/*:refs/remotes/origin/*
         url = git://...
[branch "master"]
         remote = origin
         merge = refs/heads/master
[branch "experiments"]
         remote = origin
         merge = refs/heads/experiments
isn't this enough to be able to push the experiments branch?
I tried
git push origin experiments
It tells me that it is a read-only url...
after adding
[remote "experiments"]
         url = git@...
         fetch = 
+refs/heads/experiments:refs/remotes/experiments/experiments
I can now push that branch with
git push experiments experiments
but I was wondering whether the initial config wasn't enough...
many thanks in advance
	Lorenzo
-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Next: Sitaram Chamarty
Message 1 of 6 in “pushing remote branches”
  1. Lorenzo BettiniNov 14, 2009
  2. Sitaram ChamartyNov 15, 2009
  3. Lorenzo BettiniNov 15, 2009
  4. Sitaram ChamartyNov 15, 2009
  5. Lorenzo BettiniNov 16, 2009
  6. Junio C HamanoNov 16, 2009

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.