diff --git a/cmd/init.go b/cmd/init.go
index <HASH>..<HASH> 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -40,7 +40,7 @@ func newInitCmd() *initCmd {
 				return err
 			}
 			defer gitignore.Close()
-			if _, err := gitignore.WriteString("dist/\n"); err != nil {
+			if _, err := gitignore.WriteString("\ndist/\n"); err != nil {
 				return err
 			}
 
diff --git a/cmd/init_test.go b/cmd/init_test.go
index <HASH>..<HASH> 100644
--- a/cmd/init_test.go
+++ b/cmd/init_test.go
@@ -32,7 +32,7 @@ func TestInitGitIgnoreExists(t *testing.T) {
 
 	bts, err := os.ReadFile(".gitignore")
 	require.NoError(t, err)
-	require.Equal(t, "mybinary\ndist/\n", string(bts))
+	require.Equal(t, "mybinary\n\ndist/\n", string(bts))
 }
 
 func TestInitFileExists(t *testing.T) {
fix: gitignore patching needs leading newline (#<I>)