zoukankan      html  css  js  c++  java
  • Git

    Github:

    Following the instructions to create repo.

    Git on Linux(centos):

    1. download the latest GIT and build locally. 注意: centos6.5 默认的git版本是1.7.1, 该版本与github不兼容, 需要1.7.10以上的版本才可以.
    2. download tar ball from https://www.kernel.org/pub/software/scm/git/
    3. unzip file and perform the following command.

    tar xzvf git-2.9.5.tar.gz

    make configure
    ./configure --prefix=/usr
    make install

    //perform the following command if following issue occured.

    //////////////////////////////////////////////////////////

    //Can’t locate ExtUtils/MakeMaker.pm in @INC

    yum install perl-ExtUtils-MakeMaker.x86_64

    //MSGFMT    po/bg.msg make[1]: *** [po/bg.msg] Error 127

    yum install tcl  build-essential tk gettext

    // fatal: Unable to find remote helper for 'https' after perform command git clone ...

    yum install libcurl-devel.x86_64


    git --version

    //check out

    git clone https://github.com/<your ID>/<project>.git

    //or (need add ssh key following

    //https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

    git clone git@github.com:<your ID>/<project>.git

     

    //change file.

    git add <changed/Added file>

    git status

    git commit -m "bala bala ..."

    git pull  //like rebase

    //如果出现冲突, 则会出现这样的错误.

    CONFLICT (content): Merge conflict in src/Test.java
    Automatic merge failed; fix conflicts and then commit the result.

    //解决完冲突之后.

    git add <conflict file>

    git commit -m "resolve merge conflict."

    git pull

     

    git push  //this push into the master branch on github.

     

    //branch list

    git branch -a

    //clone another branch example

    git clone -b 2.0 git@github.com:safeoa/safe.git safe-2.0

    [Merge branch into private branch]

    Execute the following command in private branch:

    git merge origin/master

    you need reslove the confilit manually if any.

  • 相关阅读:
    hibernate建表默认为UTF-8编码
    XML和JSON
    chrome 模拟发送请求的方法
    什么时候需要使用缓存?
    eclipse中查找类、方法及变量被引用的地方
    用户内容与商业
    2019第48周日
    ajax与重定向
    ifream
    Windows下找到JVM占用资源高的线程
  • 原文地址:https://www.cnblogs.com/bjfarmer/p/8436152.html
Copyright © 2011-2022 走看看