zoukankan      html  css  js  c++  java
  • git 状态管理

    git status

    # deleted: xxx.class

    # modified: xxx.xml

    查看某个文件的历史,如什么时候被提交上去。

    git log file

    git log –- xxx.class

    直接 git log file 有时会出现下错误

    fatal:ambiguous argument unknown revision or path not in the working tree , use –- to separeate paths from revisions

    1. 意思是git log 不知道后面是什么参数,因为git log其后面能够带很对象,使用--去指明是使用文件路径

     

    删除文件

    $ rm a

    查看状态

    $ git status
    On branch test
    Changes not staged for commit:
      (use "git add/rm <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)

            deleted:    a

    添加修改

    $ git add .

    查看状态

    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)

            deleted:    a

    删除提交

    $ git commit -m "sync rm a"
    [test 150abfb] sync rm a
    1 file changed, 0 insertions(+), 0 deletions(-)
    delete mode 100644 a

    删除操作也要同步,类似于startTeam当中本地删除了,在服务器还有,当同步的时候,会显示miss状态

     

    注意:

    git add .失败解决办法

    使用此方法就OK了
    $ git add -A  #或 git add -all

     

     

    vim中翻页的命令

    整页翻页 ctrl-f ctrl-b
    f就是forword b就是backward

    翻半页
    ctrl-d ctlr-u
    d=down u=up

    滚一行
    ctrl-e ctrl-y

    http://www.cnblogs.com/orez88/articles/1867879.html

    使用nano很方便操作

  • 相关阅读:
    vuerouter-2.路由跳转
    vuerouter-1.路由基础
    vuebase-11._跨域处理
    vuebase-10_Axios配置
    vuebase--9._axios post请求
    vuebase--8._axios
    vuebase-7.过滤器
    vuebase-6.自定义指令
    vuebase-5.过渡和动画
    vuebase---4.实例生命周期
  • 原文地址:https://www.cnblogs.com/pengxinglove/p/5193099.html
Copyright © 2011-2022 走看看