threads / discuss / 20271

How to host a github?

Subject: How to host a github?

## tl;dr

4 messages between Jul 29, 2009 and Sep 19, 2009.

replies: 3people: 4as markdown or json

jvsrvcs· Jul 29, 2009, 06:25 UTC · lore
I want to share code with a few co-workers and I want to use git.

I installed git (cygwin), created a /project/ and then $cd project and then $git init

I have found so much documentation as to what to do next, that I'm confused.

Do I have to create an account on github in order to share code with a few local developers?

Could I run some sort of server on my laptop in order to share code? (we only need to share during office hours). Basically I just want to share code but do not want to sign up for an account on github.

How do I work this?
thanks
jvsrvcs
-- 
View this message in context: http://www.nabble.com/How-to-host-a-github--tp24713161p24713161.html
Sent from the git mailing list archive at Nabble.com.
Alex Riesen· Jul 29, 2009, 07:59 UTC · re: jvsrvcs · lore

Re: How to host a github?

On Wed, Jul 29, 2009 at 08:25, jvsrvcs<jvsrvcs@gmail.com> wrote:
Show 5 quoted lines
>
> I want to share code with a few co-workers and I want to use git.
>
> I installed git (cygwin), created a /project/ and then $cd project
> and then $git init
See also "git add" and "git commit" in the tutorials below.
> I have found so much documentation as to what to do next, that
> I'm confused.

Start here: http://www.git-scm.com/documentation ("Tutorials" section). The recently published http://progit.org/book/ can be also recommended.

> Do I have to create an account on github in order to share code with
> a few local developers?
No.
> Could I run some sort of server on my laptop in order to share code?
Yes. You don't have to, though.
> (we only need to share during office hours).  Basically I just
> want to share code but do not want to sign up for an account
> on github.
Look for fetch, push, and patches in the tutorials.
> How do I work this?
Patiently.
Jakub Narebski· Jul 29, 2009, 09:31 UTC · re: jvsrvcs · lore

Re: How to host a github?

jvsrvcs <jvsrvcs@gmail.com> writes:
Show 7 quoted lines
> I want to share code with a few co-workers and I want to use git.
> 
> I installed git (cygwin), created a /project/ and then $cd project
> and then $ git init
> 
> I have found so much documentation as to what to do next, that
> I'm confused.

Read "Git User's Manual" (should be distributed with Git), check out "Git Community Book" (http://book.git-scm.com).

More links at:
  http://git.or.cz/gitwiki/GitDocumentation
  http://git-scm.com/documentation
Some links here might also help:
  http://git.or.cz/gitwiki/BlogPosts
> 
> Do I have to create an account on github in order to share code with
> a few local developers?
No, you don't have to do that.
 
Show 6 quoted lines
> Could I run some sort of server on my laptop in order to share code?
> (we only need to share during office hours).  Basically I just
> want to share code but do not want to sign up for an account
> on github.
> 
> How do I work this?
References about hosting git repositories, etc.:
* http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#sharing-development
  "Git User's Manual", Chapter 4. Sharing development with others
* http://book.git-scm.com/4_setting_up_a_public_repository.html
  http://book.git-scm.com/4_setting_up_a_private_repository.html
  "Git Community Book", Setting up Public/Private Repository
* My answers to similar questions at StackOverflow:
  http://stackoverflow.com/questions/978052/githow-can-i-make-my-local-repository-available-for-git-pull/978417#978417
  http://stackoverflow.com/questions/1173101/do-i-need-a-server-to-use-git/1173623#1173623
References about Git on Windows:
  http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx
  http://gitster.livejournal.com/24080.html (msysGit, not Cygwin)
-- 
Jakub Narebski
Poland
ShadeHawk on #git
daicoden· Sep 19, 2009, 21:01 UTC · re: jvsrvcs · lore

Re: How to host a github?

jvsrvcs wrote:
Show 23 quoted lines
> 
> I want to share code with a few co-workers and I want to use git.
> 
> I installed git (cygwin), created a /project/ and then $cd project
> and then $git init
> 
> I have found so much documentation as to what to do next, that
> I'm confused.
> 
> Do I have to create an account on github in order to share code with
> a few local developers?
> 
> Could I run some sort of server on my laptop in order to share code?
> (we only need to share during office hours).  Basically I just
> want to share code but do not want to sign up for an account
> on github.
> 
> How do I work this?
> 
> thanks
> 
> jvsrvcs
> 

Hey, assuming you have shell access into your laptop, create a user named git. You don't have to do this but you want to give everyone access to an account on the laptop. You could also create a usergroup and add the project folder to that group and give all your developers access to that group.

Either-way once everyone is able to log onto the laptop make a new directory called project.git. Then go into that directory and use git --bare init.

Assuming you created a user named git you can then check the code out via
git clone git@localhost:project.git
to start things off from the source you will be working on you can then use:

git init touch 'Readme' git add Readme git commit -m 'Initial Comit' git remote add origin git@ip:project.git git push origin master

-- 
View this message in context: http://www.nabble.com/How-to-host-a-github--tp24713161p25525401.html
Sent from the git mailing list archive at Nabble.com.

← back to recent threads