How can we find the old versions /commits of a file?
For example, if a file had been updated three times, how can we find the other 2 old versions, provided I only have the hash of the final version of the file?
Is there any command to list old commits?
Also, is there a way to unpin all older commits of a file, except the latest one?
The solution I am trying to understand is that if I am developing a website and I am constantly updating files and adding the folder to IPFS, the old files still remain pinned on my local node. And I may not need those old files, they are just consuming space as they accumulate over time. My website is already committed to git so I have backups.
tl;dr: you need to keep track yourself of what the older hashes are
Since adding pins content by default, you can list pinned things with ipfs pin ls --type=recursive. You can unpin things you donโt want (ipfs pin rm). Potentially unpin everything, add your site again (so there will be a single pin) and then run ipfs repo gc to clean up anything that is not pinned.