Stash-Away - Simple Git Backups for Developers

stash-away.png

The Problem

Every developer knows this situation:

Stash-away solves this by backing up your code to a separate git repository. Simple as that.

How It Works

The main idea: use a different repository for backups.

Your main project keeps a clean git history. Your backup repository stores all your experiments and work-in-progress code.

When you run stash-away push:

  1. It saves everything (including uncommitted changes)
  2. Pushes to your backup repository
  3. Your working directory stays exactly the same

Why Not Just Use Branches?

You might ask: "Why not push to a branch in my working repository?"

Here's why a separate backup repository is better:

Customer Projects

When working on customer code, their repository often has strict rules:

Work Repositories

Corporate repositories usually have:

Privacy and Compliance

With a separate backup repository:

Important: Always create your backup repository according to your company's and customer's security policies. Keep it private and use the same security standards as the main project.

Why Use Stash-Away?

Clean Git History

Your main repository only has meaningful commits. No more "WIP" or "temporary fix" commits.

Work Anywhere

Start coding on your desktop, continue on your laptop. Your unfinished work is always available.

Never Lose Work

Set up automatic backups every hour. Even if your computer crashes, you lose maximum one hour of work.

Find Old Experiments

Remember that approach you tried three months ago? It's still in your backups, ready to use.

Real Examples

Before a risky change:

stash-away push
# Now try that experimental refactoring

End of workday:

stash-away push
# Go home, pull the backup on another machine

Before a meeting:

stash-away push
# Share the backup branch with your team

Getting Started

Installation:

# Download from: [YOUR-REPOSITORY-URL-HERE]
# Build the tool
./build.sh
# Copy to your system
cp dist/stash-away /usr/local/bin/

First time setup:

# Set your backup repository
stash-away init git@github.com:yourusername/my-backups.git

# With SSH key (for private repos)
stash-away init git@github.com:yourusername/my-backups.git --identity-file ~/.ssh/id_rsa

Daily usage:

# Create backup
stash-away push

# See all backups
stash-away list

# Compare with old backup
stash-away diff backup/2024-01-15_14-30-00

# Restore a backup
stash-away restore backup/2024-01-15_14-30-00

Terminal UI

Don't like typing commands? Use the visual interface:

stash-away tui

Use arrow keys to navigate, Enter to select. Everything is just one keypress away.

stash-away-tui.png

Advanced Uses

Summary

Stash-away is not a replacement for git or professional backup systems. It's a simple tool that fills the gap between "I should save this" and "This is ready to commit".

Your code deserves better than being lost or forced into bad commits. Give stash-away a try.


Stash-away is open source and available at GitHub - dmissoh/stash-away