1  github在新的目录下添加新的文件

git init //在相应的目录下添加

git add //添加目录

git commit -m "first commit"

git config --global user.email "834916321@qq.com"

git config --global user.name "timeless"

git remote add origin https://github.com/timelessz/crm.git

git push -u origin master

遇见错误

1.$ git remote add origin git@github.com:WadeLeng/hello-world.git

错误提示:fatal: remote origin already exists.

解决办法:git remote rm origin

然后在执行:$ git remote add origin git@github.com:WadeLeng/hello-world.git 就不会报错误了

2  已经有的文件更新

先把gihub上的文件更新下来:

git pull origin master

错误提示:error:failed to push som refs to

解决办法:$ git pull origin master //先把远程服务器github上面的文件拉先来,再push 上去。

3   复制文件到当前项目

git clone https://github.com/timelessz/cardmanage.git

4 本地已经存在了代码,而仓库里有更新,把更改的合并到本地的项目

git fetch origin //获取远程更新

git merge origin/master -m “ ” //把更新的内容合并到本地分支

5把服务器上的数据更新下来

 git pull origin master

github 使用方法总结 还有一部分不太懂的更多相关文章

  1. 如何下载github项目中的某一部分

    如何下载github项目中的某一部分 一.总结 一句话总结: 通过 DownGit 下载:原地址失败的话直接百度DownGit,一大堆可用的 通过 Chrome 插件 GitZip 进行下载(推荐) ...

  2. Linux下Git和GitHub使用方法总结

    来源:Linux下Git和GitHub使用方法总结 1 Linux下Git和GitHub环境的搭建 第一步: 安装Git,使用命令 “sudo apt-get install git” 第二步: 到G ...

  3. WPF4.5新特性(MSDN的翻译读不太懂)

    WPF4.5新特性(MSDN的翻译读不太懂) 1. 新的Doctype声明 XHTML的声明太长了,我相信很少会有前端开发人员能手写出这个Doctype声明. <!DOCTYPE html PU ...

  4. 史上最全github使用方法:github入门到精通

    [初识Github]首先让我们大家一起喊一句“Hello Github”.YEAH!就是这样. 原文 http://www.eoeandroid.com/thread-274556-1-1.htmlG ...

  5. 【Mood 16 】史上最全github使用方法:github入门到精通

    [初识Github] 首先让我们大家一起喊一句“Hello Github”.YEAH!就是这样. Git 是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管 ...

  6. 史上最全github使用方法:github入门到精通--备用

    [初识Github] 首先让我们大家一起喊一句“Hello Github”.YEAH!就是这样. Git是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理 ...

  7. 【Github教程】史上最全github使用方法:github入门到精通

    原文 http://www.eoeandroid.com/thread-274556-1-1.html git pull 命令 git pull <remote> <branch&g ...

  8. 【Github教程】史上最全github使用方法:github入门到精通(转自eoeandroid.com)

    本文来源:http://www.eoeandroid.com/thread-274556-1-1.html 另附经典教程网址 :http://wuyuans.com/2012/05/github-si ...

  9. GitHub使用方法(初级)

    [初识Github] Git 是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理.在推出后,Git在其它项目中也取得了很大成功,尤其是在Ruby社区中.目 ...

随机推荐

  1. library cache lock

    SESSION 34 执行存储过程: SESSION 43 编译存储过程: SESSION 25 删除存储过程: 1.查询查看library cache lock等待事件的相关会话 SQL> s ...

  2. 【HDOJ】1474 Always On the Run

    普通DP.基本和floyd一个思路. /* 1474 */ #include <cstdio> #include <cstring> #include <cstdlib& ...

  3. POJ1789 Truck History(prim)

    题目链接. 分析: 最大的敌人果然不是别人,就是她(英语). 每种代表车型的串,他们的distance就是串中不同字符的个数,要求算出所有串的distance's 最小 sum. AC代码如下: #i ...

  4. Codeforces Round #312 (Div. 2) B.Amr and The Large Array

    Amr has got a large array of size n. Amr doesn't like large arrays so he intends to make it smaller. ...

  5. OI经典语录

    1.没有dp的日子仿佛饭菜没放盐,没有树巨结垢的日子仿佛口袋没有钱. 2.算法努力,AC随缘. 3.人生就像OI啊真是又WA又T...---J

  6. 【转】Android 基于google Zxing实现二维码、条形码扫描,仿微信二维码扫描效果--不错

    原文网址:http://blog.csdn.net/xiaanming/article/details/10163203 转载请注明出处:http://blog.csdn.net/xiaanming/ ...

  7. 【转】Linux I2C设备驱动编写(三)-实例分析AM3359

    原文网址:http://www.cnblogs.com/biglucky/p/4059586.html TI-AM3359 I2C适配器实例分析 I2C Spec简述 特性: 兼容飞利浦I2C 2.1 ...

  8. Delphi 线程resume 不能调用Execute

    如果Resume不能唤起线程,请试试如下的函数,试试. GetExitCodeThread(ThreadHandle,ExitCode)来取得ExitCode,如果ExitCode=STILL_ACT ...

  9. Generate Parentheses——LeetCode

    Given n pairs of parentheses, write a function to generate all combinations of well-formed parenthes ...

  10. 尚学堂 JAVA Day3 概念总结

    java中的运算符 1.算术运算符 + - * / % Arithmetic operators + 运算符有三种身份 Additive Operator 1)加法:如 a + b; 2)连接:如 “ ...