Error: You're on a case-insensitive filesystem

I have added a new Mac server to Jenkins node, I am getting this error while trying to run the pipeline
error: You’re on a case-insensitive filesystem, and the remote you are
trying to fetch from has references that only differ in casing. It
is impossible to store such references with the ‘files’ backend. You
can either accept this as-is, in which case you won’t be able to
store all remote references on disk. Or you can alternatively
migrate your repository to use the ‘reftable’ backend with the
following command:

git refs migrate --ref-format=reftable

Please keep in mind that not all implementations of Git support this
new format yet. So if you use tools other than Git to access this
repository it may not be an option to migrate to reftables.

This is working on other mac server

If this works on another mac server then probably the file system used on that server for the agents workspace is formatted to be case sensitive. Case sensitivity must be specified when the volume is created, so you can’t change it for an existing volume.

Well, it was working fine before formatting this server. Once i have formated it and installed everything back, I get this.

What are other option which we can do

If you need all files also the ones that only differ in case for the job execution to work properly, then I think you have no other option than ensuring that the file system used by the Jenkins job is case-sensitive. And that means you have to create a new volume and format it in a way so that it is case-sensitive.
I suggest you look at your other mac server and check if the file system there is case-sensitive or not.

Consider that the default of MacOS is case-insensitive, so your formatting probably removed that setting you had on that server.

I have removed all such branches which were conflicting.

And my Mac server is case-insensitive, just like other Mac servers.

Then also I get same error

 > /usr/local/bin/git fetch --tags --force --progress -- ssh://git@xxxxx.xxxx.xxxx:7999/xxxx/xxxxx.git +refs/heads/*:refs/remotes/xxxxx/* # timeout=60

**ERROR: Error cloning remote repo ‘xxxxxx’
hudson.plugins.git.GitException: Command “/usr/local/bin/git fetch --tags --force --progress – ssh://xxxxxx/xxxxx/xxxxxx.git +refs/heads/*:refs/remotes/xxxxx/*” returned status code 1:
stdout:
stderr: remote: Enumerating objects: 379, done.

then it start showing all the tag and branch

then i get this error**
**error: You’re on a case-insensitive filesystem, and the remote you are
trying to fetch from has references that only differ in casing. It
is impossible to store such references with the ‘files’ backend. You
can either accept this as-is, in which case you won’t be able to
store all remote references on disk. Or you can alternatively
migrate your repository to use the ‘reftable’ backend with the
following command:

git refs migrate --ref-format=reftable

Please keep in mind that not all implementations of Git support this
new format yet. So if you use tools other than Git to access this
repository it may not be an option to migrate to reftables.**

Any differences in the git version? Maybe it was not failing before or silently ignored (just guessing haven’t checked if that might be the case)

Removing the branches might not be sufficient. It might still be in the history of commits where you have conflicts.

Anyway I would not consider this a Jenkins problem.

Indeed, this is not a Jenkins issue !!, But trying to fix it

yes , there is difference in git
git version 2.52.0 failing server
git version 2.39.5 (Apple Git-154) working server