Skip to content

Swift CLI to recover discarded changes from git on macOS

Notifications You must be signed in to change notification settings

cprovatas/git-recover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-recover

Swift CLI to recover discarded changes from git on macOS

One day you're doing your usual git commands and all of a sudden you accidently discard all of your local changes and there's no way to recover all the progress you just made 👎. George Marmaridis came up with a clever solution to the problem here where you use TextEdit to browse all of the local versions of your file. I dug a little deeper and discovered that TextEdit uses the NSFileVersion API to browse all the local versions of a given file. Instead of having to manually open each file in your in TextEdit, git-recover will view all versions of every file in your repo to revert them back to the version you specify.

This tool will not recover files that were deleted or created locally before your changes were discarded

Arguments

-d directory to evaluate

-t time to revert your directory back to (in format MM/dd/yyyy hh:mm a ie: 5/15/2018 5:10 pm)

About

Swift CLI to recover discarded changes from git on macOS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages