I have two images in my repository that I want to remove: 1. "Côte d'Ivoire.png" 2. "Sao_Tomé_and_Príncipe.png"
If i delete them from Finder on a mac, git wants me to delete the file two times:
deleted: "src/assets/demo/img/flags/Co\314\202te_d'Ivoire.png"
deleted: "src/assets/demo/img/flags/C\303\264te_d'Ivoire.png"
deleted: "src/assets/demo/img/flags/Sao_Tome\314\201_and_Pri\314\201ncipe.png"
deleted: "src/assets/demo/img/flags/Sao_Tom\303\251_and_Pr\303\255ncipe.png"
I tried to just add all changes to staging and commit but then I ran into an issue when i tried to push the changes to the remote repo.
The tree object <id> was rejected: The tree contains duplicate or improperly sorted entries.
If i try to rename the files the same thing happens. It tries to delete both files two times and then add the new files with the new names.
I just can't figure out how I can remove them.
Edit: I had made some other commits after i deleted the files mentioned. I followed the steps mentioned in Tree contains duplicate file entries and figured out that the pictures was the issue.
I then tried to reset my branch to my remote branch, applied all other commits, deleted the mentioned files again, committed, pushed. This time it worked fine even though it actually deletes each file two times.