DEV Community

Aditya Sorathiya
Aditya Sorathiya

Posted on

PasteDB now has Version Control β€” Keep up to 10 versions of your pastes

Version Control is now available in PasteDB πŸš€

I've added a Version Control feature to PasteDB that makes it easier to keep track of changes made to a paste.

Instead of losing the previous content whenever you update a paste, PasteDB can now keep previous versions so you can look back at how your paste changed over time.

How it works

  • Each saved change can create a new version.
  • PasteDB stores up to 10 versions for a paste.
  • Versions are kept in chronological order.
  • When you try to save an 11th version, the oldest version is automatically deleted.
  • This keeps the version history limited to the latest 10 versions.

For example:

Version 1
Version 2
Version 3
...
Version 10
Enter fullscreen mode Exit fullscreen mode

After creating Version 11:

Version 2
Version 3
Version 4
...
Version 11
Enter fullscreen mode Exit fullscreen mode

So the history always contains the 10 most recent versions.

Why I added it

Sometimes you make a change to a paste and later realize that an earlier version was better.

Version Control gives you a way to keep those previous states without having to manually save copies of the paste.


I'm also working on more features around PasteDB's editing and collaboration capabilities, so version history is becoming an important part of the project.

What do you think would be useful to add next to version control?

Try here : https://pastedb.netlify.app/create

Top comments (3)

Collapse
 
swapnoneel123 profile image
Swapnoneel Saha

the rolling limit keeps storage predictable and the feature is easy to understand. i would add a restore action that creates a new version instead of deleting the current one, plus a small diff view and a timestamp for each change. if more than one device can edit a paste, an optimistic version check could warn about stale content before save. these details would make recovery safer.

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Yep, the timestamp system is working now! Each version now shows when it was created. Thanks for the suggestion! πŸš€

I m currently working on Collaboration
So I have no time for improving version history feature
Once I complete Collaboration then I improve version history to a next level

Do you try to make a guest paste?
Any problems or bugs, report here or from the contact page...

For more features like editing the paste or managing pastes, you can signin and make pastes
It will give you ownership of pastes but in guest paste
No ownership

Collapse
 
aditya_sorathiya_069252f4 profile image
Aditya Sorathiya

Happy to talk anytime!
Can I know what you are making?