This blog post will describe how to setup a central repository where everybody pulls from and pushes to. This is actually the default work flow in Subversion.
Create a “git” user on your server.
sudo adduser git
nano /etc/group
git:x:1000:myusername,www-data,nobody
sudo mkdir /opt/git_projects
sudo chown git.git /opt/git_projects
sudo chmod 2770 /opt/git_projects
cd /opt/git_projects
Git has a naming convention that repositories that you share with others have a “.git” suffix. Local repositories have just a name.
To create a git bare (also called shared remote) repository do the following on the command line.
su git
mkdir example.git
chmod
More >