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.
This commit introduces a new function,
detectCurrentBranch
, inmain.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.