Setting Up a Git Server

Version control is something that a lot of developers use. I have been using SVN for the longest time and ignoring Git. I found it confusing and I just left it alone. I did the same thing before I started to use SVN. I thought I would have learned by now. So take a look at the video below and I will also put the steps at the end of the post.

[embedyt] http://www.youtube.com/watch?v=1gNFrPNF9-Y%5B/embedyt%5D

On where the master git server will be hosted

mkdir /home/git/somerepo.git
cd /home/git/somerepo.git
git --bare init

Now lets go to your computer

mkdir somerepo.git
cd somerepo.git
git init
**Create a README file or you can type:
touch README
git add .
git commit -m "Some message"
git remote add origin username@yourservername:somerepo.git
git push origin master

Now this setup is just using the users that are already on the server. You can setup that you do not need to type in password. You can create just a git user. I hope that this tutorial has helped.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s