如果我更改文件、添加更改、提交并拉取,Git 会声称我有未提交的更改。当我再次尝试提交时,我收到一条“无需提交,工作树干净”的消息。
[Annas-MacBook-Pro:Project Anya$ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 4 and 3 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
Annas-MacBook-Pro:Project Anya$ git pull origin master
anna@anna-git's password:
From ssh://anna-git/git/Project
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
index.html
js/app.js
sass/custom.scss
Please commit your changes or stash them before you …Run Code Online (Sandbox Code Playgroud) git ×1