Skip to content

Commit 533ee5e

Browse files
committed
Fix #3 : add helpful tips when no Git changes are detected
Display actionable guidance for staging changes, checking status, and verifying repository location
1 parent cff43cd commit 533ee5e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmd/cli/createMsg.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ func CreateCommitMsg () {
7373

7474
if fileStats.TotalFiles == 0 {
7575
pterm.Warning.Println("No changes detected in the Git repository.")
76+
pterm.Info.Println("Tips:")
77+
pterm.Info.Println(" - Stage your changes with: git add .")
78+
pterm.Info.Println(" - Check repository status with: git status")
79+
pterm.Info.Println(" - Make sure you're in the correct Git repository")
7680
return
7781
}
7882

@@ -85,6 +89,10 @@ func CreateCommitMsg () {
8589

8690
if len(changes) == 0 {
8791
pterm.Warning.Println("No changes detected in the Git repository.")
92+
pterm.Info.Println("Tips:")
93+
pterm.Info.Println(" - Stage your changes with: git add .")
94+
pterm.Info.Println(" - Check repository status with: git status")
95+
pterm.Info.Println(" - Make sure you're in the correct Git repository")
8896
return
8997
}
9098

0 commit comments

Comments
 (0)