I tried thinking of a way to prevent accidental deletion by git reset
--hard command, as I recently faced such a problem. How can you write a
wrapper replacing the command, so that it first does something like the
following? It should create a new branch backup with all changes before

current_branch = git command
git checkout -b backup_`date`
git add -A && git commit -m "backup before git reset --hard"
git checkout $current_branch
actual git reset --hard command


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to