zoukankan      html  css  js  c++  java
  • git基础操作

    git commit -m "blablabla"

      报错 ***Please tell me who you are.

      根据它的提示输入了git config --global user.email "waynelin4wr@gmail.com" 和 git config --global user.name "Wayne Lin"就可以了。

    报错:Permission denied (publickey).
    fatal: Could not read from remote repository.
      用HTML传输方式代替SSH

    git init 创建新的版本库。

    提交到仓库,提交修改和提交新文件是一样的两步,第一步是 git add,第二步是 git commit   

    添加到远程库

      git remote add origin git@git.oschina.net:linwr/ChemicalFactory.git

      git pull origin master

      git push -u  origin master


    删除远程库

      git remot rm origin

    添加内容

      git add 

      git commit -m

    cat>>file 可以在命令行模式下追加编辑文件Ctrl~D表示编辑完成,Ctrl~U删除当前行。

    Ctrl~H 显示隐藏文件


    工作流 (摘自http://www.runoob.com/w3cnote/git-guide.html)

    你的本地仓库由 git 维护的三棵"树"组成。第一个是你的 工作目录,它持有实际文件;第二个是 暂存区(Index),它像个缓存区域,临时保存你的改动;最后是 HEAD,它指向你最后一次提交的结果。

    你可以提出更改(把它们添加到暂存区),使用如下命令:
    git add <filename>
    git add *
    这是 git 基本工作流程的第一步;使用如下命令以实际提交改动:
    git commit -m "代码提交信息"
    现在,你的改动已经提交到了 HEAD,但是还没到你的远端仓库。

    trees

    推送改动

    你的改动现在已经在本地仓库的 HEAD 中了。执行如下命令以将这些改动提交到远端仓库:
    git push origin master
    可以把 master 换成你想要推送的任何分支。

    如果你还没有克隆现有仓库,并欲将你的仓库连接到某个远程服务器,你可以使用如下命令添加:
    git remote add origin <server>
    如此你就能够将你的改动推送到所添加的服务器上去了。

  • 相关阅读:
    图表处理ZedGraph
    12月16日
    Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly
    (转)EXCEL2007存储格式xlsx
    树型数据结构设计处理
    取得表名以h_开头的表,要使用left,不要使用like
    北京挪动推出神州行5元卡套餐
    手机出口爆炸性增长 品牌输出比例大幅上升
    中电信将进驻国美电器统统门店 启动一体化营销
    联通业务厅开进国美门店
  • 原文地址:https://www.cnblogs.com/waynelin/p/5750243.html
Copyright © 2011-2022 走看看