Closed salcode closed 1 year ago
The git branch --show-current command was only introduced in Git 2.22.0, which was released 2019-06-07.
git branch --show-current
2.22.0
If you’re running an older version of Git, this command will fail. Instead we can use
git rev-parse --abbrev-ref HEAD
which gives the same result as git branch --show-current but is supported in much older versions of GIt.
We want to change git branch --show-current in this line
https://github.com/salcode/salcode-git/blob/a532c812d8672180949da692ed0b08e37c78360a/gitconfig#L5
to git rev-parse --abbrev-ref HEAD
The
git branch --show-current
command was only introduced in Git2.22.0
, which was released 2019-06-07.If you’re running an older version of Git, this command will fail. Instead we can use
which gives the same result as
git branch --show-current
but is supported in much older versions of GIt.Change to Make
We want to change
git branch --show-current
in this linehttps://github.com/salcode/salcode-git/blob/a532c812d8672180949da692ed0b08e37c78360a/gitconfig#L5
to
git rev-parse --abbrev-ref HEAD