• Bluehost上安装git服务器


    1. 在bluehost上搭建git服务器
    Step1:查bluehost操作系统版本, 一般都显示Red Hat x.x.x

     >> cat /proc/version

    Step2:下载git安装包

    >> wget http://kernel.org/pub/software/scm/git/git-1.7.5.4.tar.bz2

    注意:要到http://kernel.org上去查最新的git latest stable版本号,然后拼出地址

    Step3: 解压安装

    >> tar -xjvf git-1.7.5.4.tar.bz2
    >> cd git-1.7.5.4
    >> make
    >> make install

    Step4: 测试git

    >> git --version

    Step5: 建立git工程

    >> cd ~
    >> mkdir git
    >> mkdir myproject.git
    >> cd myproject.git
    >> git --bare init


    2. 在本地计算机启动git shell, 建立工作目录
    >> cd d:/work
    >> mkdir myproject
    >> cd myproject
    >> git init
    >> git remote add origin ssh://USERNAME@YOURDOMAIN.com/~/git/myproject.git
    >> touch .gitignore
    >> git add .
    >> git commit -m "initial commit"
    >> git push origin master

    注意:在执行最后一个指令:git push origin master时,会报一个错误:git-receive-pack: command not found, 解决方法是:编辑本地仓库目录下.git/config文件,如下所示:

    >> vim .git/config

    编辑内容:
    [remote "origin"]
    url = ssh://USERNAME@YOURDOMAIN.com/~/git/myproject.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    uploadpack=/home2/USERNAME/bin/git-upload-pack
    receivepack=/home2/USERNAME/bin/git-receive-pack
    就是把git-upload-pack, git-receive-pack两个可执行文件的地址显示的写出来,这里的/home2/USERNAME/bin/就是bluehost上安装git的目录,每次建立一个新的本地仓库,都需要编辑这个文件。


    3. 提交文件
    >> cd d:/work/myproject
    >> vim test.txt
    >> git add test.txt
    >> git commit -m "test commit"
    >> git push


    4. 在另一个工作机器上checkout工程
    >> git clone ssh://USERNAME@YOURDOMAIN.com/~/git/myproject.git


  • 相关阅读:
    html页面,左边点击链接,右边显示内容参考代码。
    下拉列表,鼠标移动上去改变颜色
    js生成验证码
    SAP MM模块之批次管理
    SAP 通过屏幕字段查看透明表
    SAP SD你要知道的透明表
    ]sap透明表、结构、簇介绍以及查找表方法
    设计模式(策略模式)
    设计模式(状态模式)
    设计模式(观察者模式)
  • 原文地址:https://www.cnblogs.com/konlil/p/2091699.html
Copyright © 2020-2023  润新知