Git local and remote repository on Linux server

Create an empty shared repository

git clone --bare git path/to/repos/project_name project_name.git
Initialized empty Git repository in git path/to/repos/project_name.git

or clone from your existing repository on your server

in your future remote repository folder 
git clone --bare git path/to/existing/local/repository project_name.git 

Finally issue next in your local empty folder

git clone

Add remote repository to existing local repository

ssh user@host "git init --bare /path/git_repos.git"
git remote add origin ssh://user@host/path/git_repos.git

Once you are done with daily changes or anytime

git remote -v // to look branch name
git push origin master //will merge your local repository to server repository

On server when you want to retrieve changes from “remote repository” (even if on your server, but not in local folder it will be a remote repository)

git fetch origin master
git pull