I've a project in Bitbucket feed via git Bash with too much commits and I want to conserve only the 5 last commits and delete all the commits before. For example for the next sequence
Last commits:
6546464
3684636
3684368
5785447
3485888
5784361
6843684
3878466
3438438
Oldest commit: 3843838
I want to save only the newest commits 6546464, 3684636, 3684368, 5785447, 3485888
and delete all the others committed before (can be hundreds)
How to do this clean action with git bash?
Thanks