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

Re: git push bug?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 19, 2007, 17:24 UTC
Message-ID
<Pine.LNX.4.64.0710191920210.16728@wbgn129.biozentrum.uni-wuerzburg.de>
In-Reply-To
<1192805255.1875.25.camel@gentoo-jocke.transmode.se>
Hi,
On Fri, 19 Oct 2007, Joakim Tjernlund wrote:
Show 17 quoted lines
> On Thu, 2007-10-18 at 23:00 +0100, Johannes Schindelin wrote:
> > 
> > On Thu, 18 Oct 2007, Joakim Tjernlund wrote:
> > 
> > > First, I didn't know that I could do that. Secondly, I was also 
> > > looking do v2.6.23:linus refspecs
> > 
> > 
> > First, then our documentation could be better.  How?
> 
> Well, it isn't clear to me how all this is supposed to work and what is 
> bugs. Clearifying that would help.
> 
> For instances I did a push with v2.6.23:refs/heads/linus and now I got a 
> branch with the SHA1 of v2.6.23 
> tag(0b8bc8b91cf6befea20fe78b90367ca7b61cfa0d) in it. Makes gitk display 
> that branch as "linus^{}".

It strikes me as really odd that you would _want_ to create a branch remotely, that has _never_ existed locally.

> > Second, why not "git checkout -b linus v2.6.23 && git push origin 
> > linus"?
> 
> An extra checkout that takes time but works.

Not only that: before trying to publish something, I would have expected you to have that branch locally, and that you actually worked on it.

> Doesn't make the above "weiredness" go away though.
Yes it does.

git checkout -b <branchname> resolves to the commit that the tag pointed to. So it would not push a tag, which you did.

Of course you could do what you planned to do, if you knew git better. But you are not familiar enough with git's inner workings yet, so I suggest to stay with things for now that work _always_, and exactly as expected.

Such as creating a branch locally, with exactly the name that you plan it to have remotely, and then pushing it with "git push origin <branchname>". Easy as apple pie.

Ciao, Dscho

Previous: Joakim TjernlundNext: Joakim Tjernlund
Message 11 of 21 in “git push bug?”
  1. Joakim TjernlundOct 18, 2007
  2. Steffen ProhaskaOct 18, 2007
  3. Joakim TjernlundOct 18, 2007
  4. Joakim TjernlundOct 18, 2007
  5. Shawn O. PearceOct 19, 2007
  6. Steffen ProhaskaOct 18, 2007
  7. Johannes SchindelinOct 18, 2007
  8. Joakim TjernlundOct 18, 2007
  9. Johannes SchindelinOct 18, 2007
  10. Joakim TjernlundOct 19, 2007
  11. Johannes SchindelinOct 19, 2007
  12. Joakim TjernlundOct 19, 2007
  13. Johannes SchindelinOct 19, 2007
  14. Jan HudecOct 20, 2007
  15. Steffen ProhaskaOct 18, 2007
  16. Johannes SchindelinOct 18, 2007
  17. Steffen ProhaskaOct 20, 2007
  18. Steffen ProhaskaOct 20, 2007
  19. Joakim TjernlundOct 20, 2007
  20. Shawn O. PearceOct 19, 2007
  21. Joakim TjernlundOct 20, 2007

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.