repository

Step by Step Guide on Setting Up git Server in Arch Linux (pushable)

Warning: This guide will create a git server readable/writable by everyone. That is no user/authentication control

# Login as root
pacman -S git

# If you want to push to the repository, do the following (2 steps).
vi /usr/lib/systemd/system/git-daemon\@.service
# Append –enable=receive-pack to the line of ExecStart

systemctl start git-daemon.socket

# If you want the git server starts on every reboot, do the following step
systemctl enable git-daemon.socket

cd /srv
mkdir git
chown git:git git
cd git

# Create a repository named project1.git
git –bare init project1.git
chown -R git:git project1.git

# at the working station (can be linux or windows machine), not root is required
# cd to your project base folder and clone the project1.git to local folder
cd /projects
git clone git://git_server_hostname_or_ipaddress/prject1.git cloned_project1
cd cloned_project1
git push origin master
# Now, you can do anything to the project (E.g. create a file file1.txt)
vi file1.txt
git commit -a
git push

Advertisements