Categories
Geeky

Git Repository on your Own Server

Your server is available over SSH? So place your own Git repository there instead of $Github|Gitlab|Whatever.

On the Server:

Create your Storage directory
# mkdir ~/myrepo
Initialise this directory
# git init –bare ~/myrepo

On the Client:

Clone this empty repo
# git clone ssh://myserver:myrepo
Create a first file
# vim README.md
Add, commit and push this as initial commit
# git add README.md
# git commit -m “initial commit” README.md
# git push