RPi

central git repositories

Objective

The objective for this project is to install a git server hosted on an RPi with the data stored on a NAS. The storage is mounted via iSCSI.

Installation

sh# apt install git openssh-server

Configuration

Git repository server

sh# mkdir myproject.git
sh# cd myproject.git
sh# git init --bare

Git Client

sh# git clone ssh://bare-repository.com/myproject.git

Syncing with git repository server

pull syncs the local repository with the central repository

sh# git pull origin master

push syncs the central repository with the local repository

sh# git push origin master

merge syncs the local repository with the central one

sh# git merge origin master

Adding a remote repository

sh# git remote add origin ssh://bare-repository.com/myproject.git

Pushing Local repository to remote server

Remote Server

sh# mkdir myproject.git
sh# cd myproject.git
sh# git init --bare

Local Server

sh# git push --mirror ssh://bare-repository.com/myproject.git