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

  • 相关阅读:
    轻配置 Vim
    PHP 使用 wkhtmltopdf/image 把HTML页面转换成 PDF/image 文件
    使用 Mailgun 实现 带附件的Email 发送功能
    LinkedIn 第三方登录(JavaScript SDK)
    react学习2
    前端面试题
    react学习
    前端面试-字符串-逆序-间隔
    前端文件上传相关知识
    js原型prototype问题
  • 原文地址:https://www.cnblogs.com/shanchui/p/12489114.html
Copyright © 2011-2022 走看看