About

I'm a full stack Javascript engineer. I enjoy creating all types of websites and create tutorials on my spare time.

Setting Up a Git Server

March 12, 2011

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.

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.