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

pushing to a remote branch that one does not own

From
Iiani <zannos@gmail.com>
Date
Jan 19, 2011, 18:16 UTC
Message-ID
<1295461011273-5940751.post@n2.nabble.com>

Hello, I want to contribute via "push" to a branch which I have previously cloned from a remote repository. There is a problem:

If i create a new commit on branch "master", which coincides with
origin/master, then I can push this commit simply with
    git push
However, if i switch to a different branch of the repository which was
cloned, for example by doing:
    git checkout origin/lilt 
Then I get the message: 
"You are in 'detached HEAD' state. You can look around, make experimental
... (etc)"
So I HAVE to create my own new branch based on the one downloaded in order
to start committing and pushing changes. My question is therefore: 

Am I strictly limited to committing only on the master / origin/master branched, and forced to make a new branch for every branch that I cloned from the remote repo, or is there a way of making the heads of the remote branches visible as local too?

Thanks, 
Iannis Zannos
-- 
View this message in context: http://git.661346.n2.nabble.com/pushing-to-a-remote-branch-that-one-does-not-own-tp5940751p5940751.html
Sent from the git mailing list archive at Nabble.com.
Next: Maaartin
Message 1 of 4 in “pushing to a remote branch that one does not own”
  1. ianiJan 19, 2011
  2. MaaartinJan 19, 2011
  3. ianiJan 19, 2011
  4. Alexey ShumkinJan 19, 2011

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.