Table of Contents

How to create a remote repository in local




Remote Repogitory side

create repogitory

mkdir -p /home/repo/test1.git
cd /home/repo/test1.git
git init --bare --share


How to use remote repogitory

Create project and push to remote repository

mkdir test1
cd test1

git init
echo "git test" > readme
git add .
git commit -m "first commit"
git remote add origin file:///home/repo/test1.git
git push origin master


git clone, edit and push

cd /tmp
git clone file:///home/repo/test1.git
ls
echo "test" >> readme
git add .
git commit -m "change test"
git push origin master

git status








Git - How to use Git.