git 添加图像未推送到服务器

git add image is not pushed to server

我用 GIMP 编辑并添加到 Android Studio 的 res 文件夹后,更改了一个可绘制的 png 文件。在模拟器上我可以看到它已更改。我可以在 bitbucket 上看到,尽管我发送了这些命令,但没有改变

git add -A #I tried also git add -u and git add .

git commit -m "new button"

git push -u origin master

我的 git 状态显示所有内容都已更新。我知道 git 的工作方式没有检测到我更改了文件。我记得几个月前我在没有使用 rm 的情况下做了一些事情,但我不记得我使用了哪个命令

我找到了解决方法,但我不愿意将其标记为答案。只是改了文件名,重构了名字,添加,提交,推送成功。

有效,但不是我几个月前启动的命令

试试 --refresh 和 --force 标志。

来自 Git 手册:

--refresh
Don’t add the file(s), but only refresh their stat() information in the index.

-f, --force
Allow adding otherwise ignored files.