-1

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

Martin G
  • 17,357
  • 9
  • 82
  • 98
Knowit09
  • 21
  • 4
  • It's Java and NOT JAVA. – Michael-O Aug 20 '13 at 12:17
  • Thank you Michael, I will correct it next time!! – Knowit09 Aug 20 '13 at 12:19
  • I tried to delete the old file C.Added file d and did commit amend again in Eclipse I could see file C with CROSS symbol and File D Should I click FINISH by clicking File D and File C (with CROSS symbol)in Eclipse ? – Knowit09 Aug 20 '13 at 12:22
  • Thank you anyways Everyone!! My Problem is solved, Delete the file, do commit-amend , In eclispe you can see the delted file with check box and updated new file with check box. click both check boxes , and click finish. you will get rid of file c and file d will be added.now i can see only a,c,d,x,y,z. thank you for your time! – Knowit09 Aug 20 '13 at 12:43

1 Answers1

0

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?

Community
  • 1
  • 1
KKKCoder
  • 903
  • 9
  • 18