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

  • 相关阅读:
    使用ML.NET预测纽约出租车费
    .NET Core玩转机器学习
    使用SonarCloud对.NET Core项目进行静态代码分析
    用分布式缓存提升ASP.NET Core性能
    确保线程安全下使用Queue的Enqueue和Dequeue
    这个拖后腿的“in”
    站在巨人肩上的.NET Core 2.1
    4,xpath获取数据
    3-Requests网络请求
    2,urllib库-网络请求
  • 原文地址:https://www.cnblogs.com/shanchui/p/12489114.html
Copyright © 2011-2022 走看看