Skip to content

Commit 5305567

Browse files
Shorter git branch command
1 parent 91909f0 commit 5305567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const isInvalidMessage = (commitMessage) => {
3535
* @returns {String}
3636
*/
3737
const fetchBranchNameFromGit = () => {
38-
return childProcess.execSync("git rev-parse --abbrev-ref HEAD", { encoding: "utf-8" }).split("\n")[0];
38+
return childProcess.execSync("git branch --show-current", { encoding: "utf-8" }).split("\n")[0];
3939
};
4040

4141
/**

0 commit comments

Comments
 (0)