How to remove sepcific files from commits in bitbucket using command line

I mistakenly committed some files ending with ~ (unsaved files on my local machine) repeatedly. c7b7b14

b50fb08

24d1f2d

These contain files ending with .html~ or .js~ and I want to get rid off them and the files are already pushed ? How do we do that?(beginner)