diff --git a/src/create_hooks.rs b/src/create_hooks.rs
index c11f16066204707e2bc1f78aa691a4fc178fe7b0..83e9194b7b1dee84c1c558b7888654eb6b70fcf2 100644
--- a/src/create_hooks.rs
+++ b/src/create_hooks.rs
@@ -118,10 +118,10 @@ pub fn create_hooks(compression: &str, mode: &str) {
     arr=(${{res// / }}) \n\
     original_commit=${{arr[5]}} \n\
     target_commit=${{arr[7]}} \n\
-    \n
-    if [ \"${{original_commit}}\" != \"${{target_commit}}\" ]; then
-        git -c core.hooksPath=/dev/null co ${{original_commit}} && gblk pre-co && git -c core.hooksPath=/dev/null checkout ${{target_commit}} && gblk checkout --mode {}
-    fi
+    \n\
+    if [ \"${{original_commit}}\" != \"${{target_commit}}\" ]; then \n\
+        git -c core.hooksPath=/dev/null co ${{original_commit}} && gblk pre-co && git -c core.hooksPath=/dev/null checkout ${{target_commit}} && gblk checkout --mode {} \n\
+    fi \n\
     ", mode);
     let post_co_cmd = post_co_cmd.as_str();
     let v = vec![post_commit_cmd, post_co_cmd];