Skip to content

Commit

Permalink
Shorter git branch command
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedobbelaere committed Dec 25, 2024
1 parent 91909f0 commit 5305567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const isInvalidMessage = (commitMessage) => {
* @returns {String}
*/
const fetchBranchNameFromGit = () => {
return childProcess.execSync("git rev-parse --abbrev-ref HEAD", { encoding: "utf-8" }).split("\n")[0];
return childProcess.execSync("git branch --show-current", { encoding: "utf-8" }).split("\n")[0];
};

/**
Expand Down

0 comments on commit 5305567

Please sign in to comment.