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

Re: Newbie to git

From
Howard Miller <howardsmiller@googlemail.com>
Date
Dec 27, 2009, 20:12 UTC
Message-ID
<26ae428a0912271212j70857e29m6248f6ec653f7551@mail.gmail.com>
In-Reply-To
<3a9710ae6b01fabf3b462da607af2534@192.168.1.222>
2009/12/27  <mysql.jorge@decimal.pt>:
Show 22 quoted lines
>> I'm a using of git for several time, but now I have the need to a git
>> server.
>> My question, where can get a howto for reallyyyy newbies on git server?
>
> One question:
>
> I've created a project on the server with:
>
> mkdir project.git
> cd project.git
> git init
>
> -and now locally, created a directory, and cloned this, it said that i was
> cloning an empty repo, fine about that.
> -now i added something locally, i get: (locally this is on a windows
> machine with tortoiso git)
>
> --
> git.exe push  --tags  "origin" master:git://192.168.1.206/projects.git
>
> error: src refspec master:git does not match any.
> error: failed to push some refs to 'git://192.168.1.206/projects.git'

Firstly, I would have a serious look at 'gitosis' for the server end (there are other similar projects I believe).

Secondly, the push command is wrong. You don't need to supply the remote URL again... that's what 'origin' is telling the push command, which remote to use. This would have been established by the original clone.

Also, again, be careful with 'empty' repositories. (again AFAIK) an empty repository is just that, it doesn't even have a master branch so you really need to check out a branch and commit something before pushing makes much sense. I'm sure this is not 100% correct but you'll be safe that way!

Howard
Previous: mysql.jorge@decimal.ptNext: mysql.jorge@decimal.pt
Message 3 of 12 in “Newbie to git”
  1. Jorge BastosDec 27, 2009
  2. mysql.jorge@decimal.ptDec 27, 2009
  3. Howard MillerDec 27, 2009
  4. mysql.jorge@decimal.ptDec 27, 2009
  5. Andreas SchwabDec 27, 2009
  6. mysql.jorge@decimal.ptDec 27, 2009
  7. Junio C HamanoDec 28, 2009
  8. mysql.jorge@decimal.ptDec 28, 2009
  9. Eugene SajineDec 28, 2009
  10. Jorge BastosDec 28, 2009
  11. Shantanu PavgiDec 28, 2009
  12. Jorge BastosDec 29, 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.