{"thread":{"id":"19410","subject":"committing to a checked out branch","startedAt":"2009-05-19T00:33:53Z","lastAt":"2009-05-19T17:01:00Z","messageCount":5,"participants":["Jeff Brown","Jay Soffian"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"114217","messageId":"bbd12f0f0905181733h6a9537d2hf4e6b7a1384fa32d@mail.gmail.com","threadId":"19410","inReplyTo":null,"subject":"committing to a checked out branch","fromName":"Jeff Brown","fromEmail":"jeff@jeffandbetsy.net","sentAt":"2009-05-19T00:33:53Z","receivedAt":"2009-05-19T00:33:53Z","isPatch":false,"sender":{"key":"jeff@jeffandbetsy.net","avatar":"https://gravatar.com/avatar/cd26dfda40a1d0ab3331ff6fce1ef5b0b0d652ee6b65d91001e68d154588f1b8?d=mp&s=160"},"body":"The workspace on my server is currently \"checked out\" so I get the big\nwarning message every time I push to there.  What is the best way to\ncleanup that working area so I can push to it without the large\nwarning every time I commit.  I know I can set a config variable to\nsquelch the message but that isn't what I want to do.  I want to make\nthe workspace on the server _not_ be checked out.\n\nThanks for the help.\n\n\n\njb\n-- \nJeff Brown\nSpringSource\nhttp://www.springsource.com/\n\nAutism Strikes 1 in 166\nFind The Cause ~ Find The Cure\nhttp://www.autismspeaks.org/\n"},{"id":"114221","messageId":"76718490905181917u1f41e06dq9cf527a1dac9bea5@mail.gmail.com","threadId":"19410","inReplyTo":"bbd12f0f0905181733h6a9537d2hf4e6b7a1384fa32d@mail.gmail.com","subject":"Re: committing to a checked out branch","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-05-19T02:17:57Z","receivedAt":"2009-05-19T02:17:57Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Mon, May 18, 2009 at 8:33 PM, Jeff Brown <jeff@jeffandbetsy.net> wrote:\n> The workspace on my server is currently \"checked out\" so I get the big\n> warning message every time I push to there.  What is the best way to\n> cleanup that working area so I can push to it without the large\n> warning every time I commit.  I know I can set a config variable to\n> squelch the message but that isn't what I want to do.  I want to make\n> the workspace on the server _not_ be checked out.\n>\n> Thanks for the help.\n\nIf you never want to checkout any branches in that repo on your\nserver, then what you want is a bare repository. The easiest way to\ncreate it is as follows:\n\n$ git clone --bare /path/to/repo /path/to/repo.git\n\nThen you can remove /path/to/repo after verifying everything is sane.\nNote the \".git\" extension is a convention denoting the repository is\nbare (vs \"repo/.git\", which implies a repository with a working copy).\n\nj.\n"},{"id":"114272","messageId":"bbd12f0f0905190809k3dc13c3ak170535a5c0eed9b9@mail.gmail.com","threadId":"19410","inReplyTo":"76718490905181917u1f41e06dq9cf527a1dac9bea5@mail.gmail.com","subject":"Re: committing to a checked out branch","fromName":"Jeff Brown","fromEmail":"jeff@jeffandbetsy.net","sentAt":"2009-05-19T15:09:05Z","receivedAt":"2009-05-19T15:09:05Z","isPatch":false,"sender":{"key":"jeff@jeffandbetsy.net","avatar":"https://gravatar.com/avatar/cd26dfda40a1d0ab3331ff6fce1ef5b0b0d652ee6b65d91001e68d154588f1b8?d=mp&s=160"},"body":"On Mon, May 18, 2009 at 9:17 PM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> On Mon, May 18, 2009 at 8:33 PM, Jeff Brown <jeff@jeffandbetsy.net> wrote:\n>> The workspace on my server is currently \"checked out\" so I get the big\n>> warning message every time I push to there.  What is the best way to\n>> cleanup that working area so I can push to it without the large\n>> warning every time I commit.  I know I can set a config variable to\n>> squelch the message but that isn't what I want to do.  I want to make\n>> the workspace on the server _not_ be checked out.\n>>\n>> Thanks for the help.\n>\n> If you never want to checkout any branches in that repo on your\n> server, then what you want is a bare repository. The easiest way to\n> create it is as follows:\n>\n> $ git clone --bare /path/to/repo /path/to/repo.git\n>\n> Then you can remove /path/to/repo after verifying everything is sane.\n> Note the \".git\" extension is a convention denoting the repository is\n> bare (vs \"repo/.git\", which implies a repository with a working copy).\n>\n> j.\n>\n\nVery good.  That appears to have worked nicely.  I appreciate the help.\n\nWhen I create a new repo on my server I have been creating an empty\ndirectory, then git init, then git add some file and commit.  I expect\nthat is the long/wrong way to initialize a repo, especially if I want\nit to be bare.  What is the best approach to creating a cloneable bare\nrepo?\n\n\n\njb\n\n-- \nJeff Brown\nSpringSource\nhttp://www.springsource.com/\n\nAutism Strikes 1 in 166\nFind The Cause ~ Find The Cure\nhttp://www.autismspeaks.org/\n"},{"id":"114273","messageId":"76718490905190821p1776905bn53610c0e8acd0113@mail.gmail.com","threadId":"19410","inReplyTo":"bbd12f0f0905190809k3dc13c3ak170535a5c0eed9b9@mail.gmail.com","subject":"Re: committing to a checked out branch","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-05-19T15:21:52Z","receivedAt":"2009-05-19T15:21:52Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Tue, May 19, 2009 at 11:09 AM, Jeff Brown <jeff@jeffandbetsy.net> wrote:\n> When I create a new repo on my server I have been creating an empty\n> directory, then git init, then git add some file and commit.  I expect\n> that is the long/wrong way to initialize a repo, especially if I want\n> it to be bare.  What is the best approach to creating a cloneable bare\n> repo?\n\nserver$ mkdir /path/to/newrepo.git\nserver$ cd /path/to/newrepo.git && git init --bare\nlaptop$ git clone ssh://server/path/to/newrepo.git\nlaptop$ cd newrepo\nlaptop$ # add; commit; add; commit; ...\nlaptop$ git push origin master\n\n(This may only work with recent versions of git as I believe earlier\nversions used to complain about cloning an empty repository.)\n\nj.\n"},{"id":"114287","messageId":"bbd12f0f0905191001iad76a64id648780547b43b34@mail.gmail.com","threadId":"19410","inReplyTo":"76718490905190821p1776905bn53610c0e8acd0113@mail.gmail.com","subject":"Re: committing to a checked out branch","fromName":"Jeff Brown","fromEmail":"jeff@jeffandbetsy.net","sentAt":"2009-05-19T17:01:00Z","receivedAt":"2009-05-19T17:01:00Z","isPatch":false,"sender":{"key":"jeff@jeffandbetsy.net","avatar":"https://gravatar.com/avatar/cd26dfda40a1d0ab3331ff6fce1ef5b0b0d652ee6b65d91001e68d154588f1b8?d=mp&s=160"},"body":"On Tue, May 19, 2009 at 10:21 AM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> On Tue, May 19, 2009 at 11:09 AM, Jeff Brown <jeff@jeffandbetsy.net> wrote:\n>> When I create a new repo on my server I have been creating an empty\n>> directory, then git init, then git add some file and commit.  I expect\n>> that is the long/wrong way to initialize a repo, especially if I want\n>> it to be bare.  What is the best approach to creating a cloneable bare\n>> repo?\n>\n> server$ mkdir /path/to/newrepo.git\n> server$ cd /path/to/newrepo.git && git init --bare\n> laptop$ git clone ssh://server/path/to/newrepo.git\n> laptop$ cd newrepo\n> laptop$ # add; commit; add; commit; ...\n> laptop$ git push origin master\n>\n> (This may only work with recent versions of git as I believe earlier\n> versions used to complain about cloning an empty repository.)\n>\n\ngit init --bare\n\nThat is the bit I needed.\n\nThanks again!\n\n\n\njb\n\n-- \nJeff Brown\nSpringSource\nhttp://www.springsource.com/\n\nAutism Strikes 1 in 166\nFind The Cause ~ Find The Cure\nhttp://www.autismspeaks.org/\n"}]}