Re: committing to a checked out branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 19, 2009 at 10:21 AM, Jay Soffian <jaysoffian@xxxxxxxxx> wrote:
> On Tue, May 19, 2009 at 11:09 AM, Jeff Brown <jeff@xxxxxxxxxxxxxxxx> wrote:
>> When I create a new repo on my server I have been creating an empty
>> directory, then git init, then git add some file and commit.  I expect
>> that is the long/wrong way to initialize a repo, especially if I want
>> it to be bare.  What is the best approach to creating a cloneable bare
>> repo?
>
> server$ mkdir /path/to/newrepo.git
> server$ cd /path/to/newrepo.git && git init --bare
> laptop$ git clone ssh://server/path/to/newrepo.git
> laptop$ cd newrepo
> laptop$ # add; commit; add; commit; ...
> laptop$ git push origin master
>
> (This may only work with recent versions of git as I believe earlier
> versions used to complain about cloning an empty repository.)
>

git init --bare

That is the bit I needed.

Thanks again!



jb

-- 
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]