Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GIT新手:如何检查我的案例中发生了什么变化?_Git_Github_Git Svn - Fatal编程技术网

GIT新手:如何检查我的案例中发生了什么变化?

GIT新手:如何检查我的案例中发生了什么变化?,git,github,git-svn,Git,Github,Git Svn,我是GIT的新手。我正在Ubuntu机器上开发项目 在我的项目根路径中,当键入git status时,我在终端窗口上获得了以下输出: # On branch develop # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in wo

我是GIT的新手。我正在Ubuntu机器上开发项目

在我的项目根路径中,当键入
git status
时,我在终端窗口上获得了以下输出:

# On branch develop
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   Rakefile
#   modified:   db/schema.rb
关于分支机构的发展 #已更改但未更新: #(使用“git add…”更新将提交的内容) #(使用“git签出--…”放弃工作目录中的更改) # #修改:Rakefile #修改:db/schema.rb 但是,我不知道这些文件上有哪些更改/修改,如何检查这两个文件上有哪些更改?

只需运行:

 git diff
如果您想从这些命令中获得漂亮的彩色输出,那么设置配置选项
color.ui
,如下所示:

git config --global color.ui auto

我运行“git diff”,得到一些以“+”和“-”符号开头的输出,它们代表什么?以
+
开头的行显示您添加的新行,而以
-
开头的行显示文件中的行,但现在已被删除。四个。更多投票。注意:将git diff与外部工具(如超越比较)耦合也会有所帮助:一千票!你现在正式成为git神了(当然你在徽章之前是我的)@VonC:谢谢-当然,没有什么比得上你在这里的非凡工作:)