guide source
https://www.liaoxuefeng.com
this is best guide i found.
step one: install git
...
step two: config
git config -- global user.name "XX"
git config -- global user.email "XXX"
step three: create repository
mkdir learngit
cd learngit
git init
add file to repository
touch test.txt
git add test.txt
git commit -m "add test.txt"