In order to change the data directory, you need to add git_data_dirs in /etc/gitlab/gitlab.rb |
You can find a point can add your own data directory in /etc/gitlab/gitlab.rb - below shows in my case:
git_data_dirs({ "default" => { "path" => "/home/git"} }) |
sudo gitlab-ctl stop |
sudo su git rsync -av /var/opt/gitlab/git-data/repositories /home/git/ exit |
sudo gitlab-ctl upgrade |
sudo gitlab-ctl start |