Git --amend in Eclipse JAVA

1.6k Views Asked by At

I tried to Push some files in git
For example a,b,c,x,y,z files..

I did commit ammends after i found some mistakes int he files... I did commit amend for same files and pushed same files a,b,c,x,y,z

After Some commits I realized that , i dont want file "C" instead I want file "D". I added file "D" and did commit amend..

Now everything goes fine but now I could see all files after commit amend a,b,c,d,x,y,z but I dont want to send C file to git I want remove file C after doing commmit amend and want to see only a,b,d,x,y,z files I am using Eclipse,JAVA for doing this process

Any help appreciated

1

There are 1 best solutions below

0
On

Git's --amend option only allows you to amend the last commit. If you want to amend commits you have done sometimes ago. You need to follow this: How to modify a specified commit in git?