Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 531 Bytes

autosave.md

File metadata and controls

22 lines (15 loc) · 531 Bytes

Git Autosave

I've recently discovered useful Git configuration snippet which I now use daily as a means temporal backup before pulls & merges.

Snippet credits goes to justinmk.

Here it goes.

[alias]
    autosave = "!git stash save autosave-$(date +%Y%m%d_%H%M%S)"

How to use:

λ ./til/ master* git autosave
Saved working directory and index state On master: autosave-20160207_191131
HEAD is now at 08efc4b Initisal version of README

λ ./til/ master git stash apply