Local git


Define a repo somewhere in your file system with a bare init

mkdir -p /somewhere/repo/test_projectcd /somewhere/repo/test_projectgit init --bare

Now create a local folder for your work with init only

mkdir -p /somewhereelse/work/test_projectcd /somewhereelse/work/test_projectgit init

Attach your working folder to the repo

git remote add origin file:///somewhere/repo/test_project

Create your files and commit it

echo "#first commit" > README.mdgit add README.mdgit commit

Now push to origin and set upstream

git push --set-upstream origin master

The end.