//for remote repository
step1: create public directory for remote access repository
#mkdir /git/pub
step2: #cd /git/pub
#git clone --bare proj
Then, you will get proj.git. It is no working tree
step3: Edit /et/cgitrc
# List of repositories
repo.group=gittest
repo.url=test
repo.path=/apps/git/pub/proj.git
repo.desc= projgit
repo.owner= winnie
step4: cd /git/pub/proj.git
#touch git-daemon-export-ok
step5: Enable git-daemon and can freely git clone
#/usr/lib/git-core/git-daemon --enable=receive-pack&
==========================
//for local repository
step6: create local project
#mkdir /git/local/proj
#cd /git/local/proj
#git init
==========================
//updated (pull) local repostory from remote repository
# git fetch ../pub/proj.git
# git merge FETCH_HEAD
// Push local file to remote repository
#git push ../pub/proj.git/ master:master
//Create new branch and push it to remote repository
#git checkout -b new-branch
Then, push it to remote repository
#git push ../pub/proj.git/ new-branch:new-branch
沒有留言:
張貼留言