ksred / GitPilotAI

5 stars 0 forks source link

Add new function to detect current Git branch #2

Closed ksred closed 7 months ago

ksred commented 7 months ago

This commit introduces a new function, detectCurrentBranch, in main.go. The function executes a Git command to retrieve the name of the current branch and returns it as a string. This addition enhances our tool's capability to interact with Git, specifically by allowing it to programmatically determine the current branch name. Error handling is included to manage any issues encountered during the command execution.