I assume you are using the Xonotic Build System. I had this problem too, but somehow, I fixed it.
EDIT: the build pack has been updated, please update instead of doing this ~Mr. Bougo
First, download a copy of MSYSGIT Portable
here. (You will need
7-zip in order to open this!) Then, using 7-zip, extract MSYSGIT into the "git" folder in your Xonotic Build System directory. Tell Windows to overwrite everything. Hopefully, the next time you run build.bat, it should build fine. Be warned, building is a time-consuming process on most machines, but is definitely worth it in the end!
Have fun, good sir! Hope this helps!
EDIT: By the way, welcome to the Xonotic community!