Re: How to create empty CENTRAL git with master / development branch ?

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

 



On Tue, 03 Apr 2012 16:54:19 +0200
Holger Hellmuth <hellmuth@xxxxxxxxxx> wrote:

> On 03.04.2012 12:53, J. Bakshi wrote:
> > Dear list,
> >
> > I need to create git repos on a remote server by the command executed on that server
> > through ssh as
> >
> > ` ` ` ` `
> > git --bare init project_name.git
> 
> you probably meant "git init --bare project_name.git"

Yes right. Sorry for the mistake.

> 
> > How can I also add the master branch, so that users don't need to
> > execute  [ git push origin master ]  ?
> 
> What else do you want them to execute? "git init --bare" creates an 
> empty repository. Without pushing to it it will always stay empty
> 
> Generally: If you want a central repository, the first one to push to it 
> might do something like this:
> 
> git remote add origin ssh://big.brother.edu/repo.git
> git push origin master
> git config branch.master.remote origin
> git config branch.master.merge refs/heads/master
> 
> Everyone else could do
> 
> git clone 
> 
> Now everyone will push to the repository master when they do "git push".
> 
> Is that what you wanted to know?

well.... I like to create the master just after creating the bare repo.
So that the users can just start working on it without "git push origin master"
As I can already ssh into the central git server, I don't need any further
ssh://big.brother.edu/repo.git

So what should I do after creating a bare empty repo to generate the master
there ?

# git init --bare project_name.git

# cd project_name.git

.... and can I execute here any command to add master ?

Thanks
--
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]