How does git delete previous submission records while retaining the current content?

I have a remote repository, and then I clone it locally and submit it many times locally.
there are many pictures in the submission history (various deletions and corrections).

I would like to ask, if I push, will deleted images (once commit to the local warehouse) be recorded and submitted?

is there any way to discard all past commit records while keeping the current warehouse status?

my actions are as follows

  1. clone remote warehouse to local
  2. add a bunch of pictures to the local warehouse, add and then commit to the local warehouse
  3. the local warehouse deleted the picture, add and then commit to the local
  4. at this time I push , will the image added in step 2 be submitted to the remote repository?
Mar.11,2021

there will be a submission record. Can be traced back to the source, if you want to erase the record. no, no, no.
you can learn about rebase (use this as little as possible)


rebase. You can merge all the previous commit into a


remote warehouse that will be submitted. How about locally? after submission, what about the remote warehouse


there is a relatively simple method, if you want to merge the last two changes,

git reset-- soft HEAD~2

and then re-commit it.


git stash
Git reset-- hard HEAD~2
Git stash pop

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e436d9-441bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e436d9-441bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?