zoukankan      html  css  js  c++  java
  • Git学习——查看修改记录

    查看修改结果

      修改之前commit的文件,输入下面的而命令,可以查看文件的改动,输入下面命令。还可以采用git diff命令来看看具体修改了什么。

      如果确认无误,添加add和提交commit文件。

    git status
    
    On branch master
    Changes not staged for commit:
        (use "git add <file>..." to update what will be committed)
        (use "git checkout -- <file>..." to discard changes in working directory)
    
                modified: readme.txt
    
    no changes added to commit (use "git add" and/or "git commit -a")                

      

      

    git diff
    warning: LF will be replaced by CRLF in readme.txt.
    The file will have its original line endings in your working directory.
    diff --git a/readme.txt b/readme.txt
    index 46d49bf..9247db6 100644
    --- a/readme.txt
    +++ b/readme.txt
    @@ -1,2 +1,2 @@
    -Git is a version control system.
    +Git is a distributed version control system.
     Git is free software.

      

      

  • 相关阅读:
    Java程序员必知的8大排序
    JQUERY 展开收起显示隐藏效果
    Java程序员必知的8大排序
    辞职申请
    值得收藏的Microsoft SQL Server下的SQL语句
    SQL
    sql language
    insert with special ID
    ExcuteNonQuery
    JS
  • 原文地址:https://www.cnblogs.com/cjvae/p/9164051.html
Copyright © 2011-2022 走看看