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

  • 相关阅读:
    Scala-高阶函数
    Scala-高阶函数
    Fragment学习笔记
    android中progress进度条的使用
    spinner下拉列表
    GridView
    利用jsp和servlet,MySQL实现简易报表
    android中TimePicker和DatePicker的简单使用
    android适配器及监听点击和滚动在ListView中的使用
    android简易计算器
  • 原文地址:https://www.cnblogs.com/shanchui/p/12489114.html
Copyright © 2011-2022 走看看