Ordinary Technology

Local git

December 2, 2019

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

mkdir -p /somewhere/repo/test_project
cd /somewhere/repo/test_project
git init --bare

Now create a local folder for your work with init only

mkdir -p /somewhereelse/work/test_project
cd /somewhereelse/work/test_project
git 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.md
git add README.md
git commit

Now push to origin and set upstream

git push --set-upstream origin master

The end.