zoukankan      html  css  js  c++  java
  • git的日常使用

    首次上传项目到github上

    在项目上右击——>选择  Git Bash Here  直接进入到存放项目文件的地址

    git init     在当前项目的目录中生成本地的git管理

    git add .   将项目上的所有的文件添加到仓库中,如果想添加某个特定的文件,只需要把 . 换成这个文件名就可以了

    git commit "注释"  对这次提交的项目进行注释

    这时可能会弹出让你输入用户名和密码的输入框

    git romote add origin  https://github.com……       https://github.com……这个是自己的仓库url地址,当你在github中创建仓库时会有,这里是将本地仓库关联到github上

    git  push -u origin master  将代码上传到github上

    再次上传项目到远程仓库

      在项目上右击——>选择  Git Bash Here  直接进入到存放项目文件的地址

    git add .

    git commit -m "注释"

    git push origin master

    拉取远程仓库到本地

    在项目上右击——>选择  Git Bash Here  直接进入到存放项目文件的地址

      git pull origin master

    下面是使用git出现的错误以及解决方法

     问题:fatal: unable to access 'https://github.com/whjybear/nuoge.git/': Could not resolve host: github.com         (这个错误在输入 git push origin master时出现)

    解决方法:git config  --global --unset http.proxy

         git config  --global --unset https.proxy

  • 相关阅读:
    经典SQL语句大全
    《构建高性能Web站点》观后感
    网搜索引擎架构设计
    使用Windows系统的几个好的习惯
    静态页面对seo优化之详解
    让您SEO学习时间缩短一半的高阶秘籍
    java链表
    GAE 数据存储——事务
    GAE 博客——B3log Solo 0.2.0 发布了!
    Wine 1.3.7 发布
  • 原文地址:https://www.cnblogs.com/shanchui/p/12489114.html
Copyright © 2011-2022 走看看