Search code examples
androidgitgit-push

git add image is not pushed to server


I changed a drawable a png file after I edited with GIMP and added to Android Studio in res folder. On the emulator i can see it is changed. And i can see on bitbucket that is not changed although i send these commands

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

git commit -m "new button"

git push -u origin master

my git status says that everything is updated. I understand that the way git works does not detect that i changed the file. I remember i did it something in few months ago without using rm but I cannot remember which command I used


Solution

  • Try the --refresh and --force flags.

    From the Git manual:

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

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