zoukankan      html  css  js  c++  java
  • github 使用方法总结 还有一部分不太懂

    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
  • 相关阅读:
    深入分析Spring之IOC之加载BeanDefinition案例详解
    JDK10的新特性:var和匿名类如何运用?正确的案例讲解
    SpringMVC中如何获取请求参数?案例详解
    如何用Spring Boot集成Ehcache缓存,教你三招搞定
    基础练习-4.数列特征
    基础练习-3.字母图形
    基础练习-2. 01字串
    基础练习-1.闰年判断
    入门训练-4. Fibonacci数列
    入门训练-3.圆的面积
  • 原文地址:https://www.cnblogs.com/timelesszhuang/p/3947598.html
Copyright © 2011-2022 走看看