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:<id>/<project id>.git <local alias>

[Merge branch into private branch]

Execute the following command in private branch:

      git merge origin/master

you need reslove the confilit manually if any.

比对文件两次提交的difference:

git log -n 5 <path>

git diff <commit  #1> <commit #2> <path>

Git - 简单的使用与Github的更多相关文章

  1. 小丁带你走进git世界一-git简单配置

    小丁带你走进git世界一-git简单配置 1.github的简单配置 配置提交代码的信息,例如是谁提交的代码之类的. git config  –global user.name BattleHeaer ...

  2. Git简单应用(1)

    Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. 1.Windows安装git msysgit是Windows版的Git,从https://git-for-windows. ...

  3. Git 的深入理解与GitHub托管服务(转)

    源代码管理系统(SCM)与版本控制   版本控制是一种记录若干文件内容变化,以便将来查阅特定版本修订情况的系统.   本地版本控制系统   许多人习惯用复制整个项目目录的方式来保存不同的版本,或许还会 ...

  4. git简单入门

    git简单入门 标签(空格分隔): git git是作为程序员必备的技能.在这里就不去介绍版本控制和git产生的历史了. 首先看看常用的git命令: git init git add git comm ...

  5. 使用git上传项目到github

    来自: http://www.cnblogs.com/specter45/p/github.html GitHub是基于git实现的代码托管.git是目前最好用的版本控制系统了,非常受欢迎,比之svn ...

  6. 使用Git简单笔记

    这里只是作为简单的笔记整理,第一次使用的推荐先看一下廖大的教程,内容很多很细,可以边看边练.看不懂的地方先记着.争取七七八八看下来. ================================= ...

  7. 使用git上传项目到github的最基础命令

    一.前言 把github作为自己项目托管的地方,实在是一个明智的选择.就算你不为自己项目考虑,你也要为你团队项目开发而学呀!可能有些初学者(比如我)会觉得git命令好多啊,又是各种术语,觉得好难上手. ...

  8. Git的深入理解与GitHub托管服务的使用

    [转自] http://www.cnblogs.com/cocowool/archive/2012/02/17/2356125.html 源代码管理系统(SCM)与版本控制 版本控制是一种记录若干文件 ...

  9. 还在使用pdf、word简历?简单五步实现github托管个人逼格简历

    写在前面: 什么是git.github? git 版本控制工具 github 通过git工具做的版本控制的项目托管平台 项目开发肯定不止一个程序猿,多个程序猿针对同一个文件进行代码读写操作时,是先保存 ...

随机推荐

  1. 转化dataframe中一组序列为时间序列的方法-to_datetime()的最新用法

    一.to_datetime()的最新用法: hs300_hf['date'] = pd.to_datetime(hs300_hf['date']) hs300_hf.set_index('date', ...

  2. CorelDRAW不同选择工具的作用及用法汇总

    在CorelDRAW中,"选择工具"是我们的好助手之一."选择工具"图标位于CDR界面左边的工具箱中.使用鼠标单击图标右下角的小三角,我们可以看到"选 ...

  3. 如何将MathType恢复出厂设置

    必大家都知道,我们日常使用的手机是自带恢复出厂设置功能的,其实除了手机,咱们今天要说的这款公式编辑器MathType,也是可以进行恢复出厂设置操作的哦,下面就让小编给大家介绍一下吧. 一.打开Math ...

  4. 下载器Folx教程:智能标签怎么用?

    Mac专用下载器Folx的智能标签中内置了图片标签,可以自动分类图片文件,但要如何分类GIF图片呢?其实,我们可以在Folx的标签面板创建动图标签,然后再创建标签专属的下载文件夹,来独立存放GIF格式 ...

  5. 对KVC和KVO的理解

    html { overflow-x: initial !important } :root { --bg-color: #ffffff; --text-color: #333333; --select ...

  6. css实现元素环形旋转

    元素中心旋转效果记录 先上代码 //css代码 .header{   -webkit-animation:rotateImg 1s linear infinite;   /*rotateImg对应下方 ...

  7. 考研数学数一公式整理(微积分&线性代数&概率统计)

    主要根据李永乐老师的线性代数讲义.全书和汤家凤老师的高数讲义整理的. 用于记背数学需要背的公式和步骤,概念.定义.公式多,方法步骤少(毕竟太庞杂了). 本来是自用,但还是分享一下,希望有补充指正! 链 ...

  8. java数组作为函数返回值

    1 //将一个二维数组行和列元素互换.存到另一个二维数组 2 package test; 3 4 public class test1_8 { 5 public static int[][] huhu ...

  9. Linux(Ubuntu16.04)下的MediaWiki的部署启动

    一.服务器部分 使用XAMPP配置MediaWiki部署所需要的环境. 1. 查看服务器的版本与位数: sudo lsb_release -a      //查看系统版本 uname -a       ...

  10. vue微博回调接口

    1.vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1 页面路径 components\oauth.vue <tem ...