This tutorial will show you how to configure a centralized Git server as an alternative to using third-party services, such as Github or Bitbucket. Running your own server is likely to be cheaper and safer. It is "safer" is because large sites, such as Github, are a bigger target for hackers. Also, you know exactly how your server is configured and where your data is stored.
It seems to me that the primary reason to use Git is that everyone else is using it. Thus, it is the most likely tool to be easily integrated into other tools/services as they arise such as composer/satis. The prevalence of git also means that it's very easy to start working with others with one less thing to agree on (people can get very passionate about which tools they use). In terms of version control itself, I think that most people are not investing enough time into studying the alternatives, such as SVN or Mercurial.
I wanted to use a distro that I wouldn't need to update and reboot every other week, like I do with Ubuntu. I have stopped "supporting" CentOS ever since version 7, and Debian is incredibly easy to work with, coming from a heavy Ubuntu user's perspective.
sudo adduser $GIT_USER # fill in the details and use a strong password. su $GIT_USER cd $HOME
I will show you how to do this in another tutorial and link to it when it becomes available.
sudo apt-get install git -y
mkdir repos cd repos
mkdir $REPO_NAME cd $REPO_NAME git init --bare
cd /path/to/stick/repo git clone $GIT_USER@$SERVER_IP/path/to/repos/$REPO_NAMECongratulations! You now have a local copy of the repository.
touch README.txt git add README git commit . -m "My commit description goes here" git push $GIT_USER@$SERVER_IP:/path/to/repos/$REPO_NAME