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

Re: git push in a git-init without --bare option?

From
Elia Pinto <gitter.spiros@gmail.com>
Date
Jun 26, 2011, 11:35 UTC
Message-ID
<BANLkTikWz81GM5mouzOHwi4eAGvg1BG8XQ@mail.gmail.com>
In-Reply-To
<201106261142.28142.psdc1978@gmail.com>

Git doesn't keep track on the remote repo if someone change the checkout file. So it was always a bad habit to push to a not bare repo, you could lost commit. From 1.7 git don't permit, by default, to push to a non bare repo. Best regards

2011/6/26, Pedro Sa Costa <psdc1978@gmail.com>:
Show 21 quoted lines
> Hi,
>
> I'm newbie in git and I'm trying to understand how git works.
>
> - I see that in git, I can't do git-push to a repository that wasn't created
> with git-init --bare. Why?
>
> - But doing git-pull and git-checkout to the same repository is possible.
> I'm
> really confused. Any help?
>
> --
> Best regards,
>
> -----------------------
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-- 
Inviato dal mio dispositivo mobile
Previous: Pedro Sa CostaNext: Matthieu Moy
Message 2 of 5 in “git push in a git-init without --bare option?”
  1. Pedro Sa CostaJun 26, 2011
  2. Elia PintoJun 26, 2011
  3. Matthieu MoyJun 26, 2011
  4. Pedro Sa CostaJun 26, 2011
  5. Christof KrügerJun 26, 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.