Stake Pool Node - Error when running nix-build

I am on CentOS7 and at the step to build the NIX. i run the following command from Building Cardano Node with nix — cardano-node Documentation 1.0.0 documentation

[node@ADA-host cardano-node]$ nix-build -A scripts.mainnet.node -o mainnet-node-local
Unknown option: -C
usage: git [–version] [–help] [-c name=value]
[–exec-path[=]] [–html-path] [–man-path] [–info-path]
[-p|–paginate|–no-pager] [–no-replace-objects] [–bare]
[–git-dir=] [–work-tree=] [–namespace=]
[]
Unknown option: -C
usage: git [–version] [–help] [-c name=value]
[–exec-path[=]] [–html-path] [–man-path] [–info-path]
[-p|–paginate|–no-pager] [–no-replace-objects] [–bare]
[–git-dir=] [–work-tree=] [–namespace=]
[]
error: program ‘git’ failed with exit code 129
(use ‘–show-trace’ to show detailed location information)

I included the --show-trace

[node@ADA-host cardano-node]$ nix-build --show-trace
Unknown option: -C
usage: git [–version] [–help] [-c name=value]
[–exec-path[=]] [–html-path] [–man-path] [–info-path]
[-p|–paginate|–no-pager] [–no-replace-objects] [–bare]
[–git-dir=] [–work-tree=] [–namespace=]
[]
Unknown option: -C
usage: git [–version] [–help] [-c name=value]
[–exec-path[=]] [–html-path] [–man-path] [–info-path]
[-p|–paginate|–no-pager] [–no-replace-objects] [–bare]
[–git-dir=] [–work-tree=] [–namespace=]
[]
error: while evaluating anonymous function at /home/node/cardano-node/nix/default.nix:1:1, called from /home/node/cardano-node/default.nix:14:10:
while evaluating the attribute ‘“haskell.nix”’ at /home/node/cardano-node/nix/default.nix:17:5:
while evaluating ‘compat’ at /home/node/cardano-node/nix/default.nix:11:14, called from /home/node/cardano-node/nix/default.nix:17:21:
program ‘git’ failed with exit code 129

Got it! run
git --version
git version 1.8.3.1 (very old version)

need to remove git 1.8.3.1
sudo yum remove git*

sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm

sudo yum install git
git --version
git version 2.30