From 3f2ad3fa8f8d572f5d53f6dc60dd8cd19e77ec14 Mon Sep 17 00:00:00 2001 From: overengineer <54alpersaid@gmail.com> Date: Fri, 8 Oct 2021 07:36:29 +0300 Subject: [PATCH] Ignored error when git restore --staged fails when there is no commit --- bin/git-magic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-magic b/bin/git-magic index b6b7b6f..f020c74 100755 --- a/bin/git-magic +++ b/bin/git-magic @@ -68,7 +68,7 @@ if [[ $ALL == true ]]; then # Restore staging area so that, for example, # add and modify will not be separate entries in status - git restore --staged . + git restore --staged . || true git add . fi