1.0.5 ⢠Published 8 months ago
git-stash-sync v1.0.5
Git Stash Sync š
A CLI tool to **automatically track and back up Git stashes to a remote ref. Never lose your stashes again, even after resetting your laptop!
Features
ā
Tracks git stash push/pop automatically
ā
Creates a compressed backup (tar.gz) of stashes
ā
Pushes stash backups to a remote branch (${username}-stash)
ā
Restores stashes when setting up a new machine
Installation
Via NPM (Recommended)
npm install -g git-stash-syncUsage
Sync Stashes
git-stash-sync initThe above command will create a compressed backup of your stashes and push them to a remote ref.
Restore Stashes
git-stash-sync restoreThe above command will restore your stashes from the remote ref.
Auto Sync
You can create a git aliash to automatically sync your stashes on every git stash push/pop.
git config --global alias.stash '!git stash $@ && git stash-sync backup'Now, every time you run git stash push/pop, your stashes will be automatically backed up to a remote branch.