cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

middleware:version-control:git:create-remote-repo-in-local



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.




middleware/version-control/git/create-remote-repo-in-local.txt ยท Last modified: 2022/03/18 by admin

Page Tools