向git server上传一个新的project

来源:互联网 发布:npc算法 编辑:程序博客网 时间:2024/06/06 07:25

Assuming your project is /home/user/project_dir/

 

Git server is //10.0.0.1/

 

and all your operatoin do on the server side. 

 

# cd /home/user/project_dir/

# git init

# git add .

# git remote add origin ssh://10.0.0/home/user/project_dir/project_dir.git 

# git commit -a -m "initial"

 

For using on git web :

 

# cd /var/private/

# ln -s /home/user/project_dir/.git  project.git

# cd /pub/scm/

# ln -s /home/user/project_dir/.git project.git

 

All above steps and content is useful for my company environment, and not suitable for all people's. 

Just FYI.

原创粉丝点击