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

Re: committing to a checked out branch

From
Jay Soffian <jaysoffian@gmail.com>
Date
May 19, 2009, 02:17 UTC
Message-ID
<76718490905181917u1f41e06dq9cf527a1dac9bea5@mail.gmail.com>
In-Reply-To
<bbd12f0f0905181733h6a9537d2hf4e6b7a1384fa32d@mail.gmail.com>
On Mon, May 18, 2009 at 8:33 PM, Jeff Brown <jeff@jeffandbetsy.net> wrote:
Show 8 quoted lines
> The workspace on my server is currently "checked out" so I get the big
> warning message every time I push to there.  What is the best way to
> cleanup that working area so I can push to it without the large
> warning every time I commit.  I know I can set a config variable to
> squelch the message but that isn't what I want to do.  I want to make
> the workspace on the server _not_ be checked out.
>
> Thanks for the help.

If you never want to checkout any branches in that repo on your server, then what you want is a bare repository. The easiest way to create it is as follows:

$ git clone --bare /path/to/repo /path/to/repo.git

Then you can remove /path/to/repo after verifying everything is sane. Note the ".git" extension is a convention denoting the repository is bare (vs "repo/.git", which implies a repository with a working copy).

j.
Previous: Jeff BrownNext: Jeff Brown
Message 2 of 5 in “committing to a checked out branch”
  1. Jeff BrownMay 19, 2009
  2. Jay SoffianMay 19, 2009
  3. Jeff BrownMay 19, 2009
  4. Jay SoffianMay 19, 2009
  5. Jeff BrownMay 19, 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.