IPB

Welcome Guest ( Log In | Register )

> [git]Git 使用相关
猫猫草
post 2013-03-19 14:46:49, Tue
Post #1


猫猫猫
***

Group: Power Cat
Posts: 626
Joined: 2006-12-8
Member No.: 2



快速架设基于 ssh 的 git 服务器:

一、将一个源码目录初始化为 Git 版本库项目目录

代码
cd $MY_SOURCE_CODE_PATH
git init --shared=group
git add -f -A .
git commit -a -m "Current Infos"


二、提取 Git 对象信息

代码
cd $MY_PROJECT_PATH
cd ..
git clone --bare $MY_PROJECT_PATH_NAME ${MY_PROJECT_PATH_NAME}.git


三、复制 Git 对象信息到目标 ssh 服务器

代码
cd $MY_PROJECT_PATH
cd ..
scp -r -P <ssh port> ${MY_PROJECT_PATH_NAME}.git username@hostname:$HOST_GIT_PATH


四、使用刚刚上传的 Git 版本库项目

代码
git clone ssh://username@hostname:sshport/$HOST_GIT_PATH/$MY_PROJECT_PATHNAME
Go to the top of the page
 
+Quote Post

Posts in this topic
猫猫草   [git]Git 使用相关   2013-03-19 14:46:49, Tue
猫猫草   Git 分支策略和操作: 一、创建 develop...   2013-04-12 03:15:44, Fri


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2024-12-25 14:31