[英]Git: How to find uncommitted changes so far?
Here is the situation I ran into: 这是我遇到的情况:
When I tried to git pull
, I found my collaborator had committed some changes, hence got the following error message. 当我尝试
git pull
,我发现我的协作者进行了一些更改,因此得到以下错误消息。
error: Your local changes to the following files would be overwritten by merge:
template.tex
Please, commit your changes or stash them before you can merge.
Aborting
So I want to know what changes I have made so far since my last commit , so that I can decide to commit them or stash them. 因此,我想知道自上次提交以来到目前为止所做的更改 ,以便我可以决定提交或隐藏它们。
Well if you haven't added any new files, you can just simply run git diff
on a terminal for the specific changes. 好吧,如果您尚未添加任何新文件,则只需在终端上运行
git diff
进行特定更改即可。 Running git status
would show the file changes to be committed for the next commit. 运行
git status
将显示要为下一次提交提交的文件更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.