Why choose ? It should be both.
Your development environment should be configured so it's as easy as doing a checkout, open, build, run, debug (eg: no absolute path!). You can do that easily with compilation directives, configuration class + dependancy injection, or even tricks like the perso.config in ASP.NET
Your automated build script should be customized enought to take care of specific production configuration, clean up, packaging etc.
The GPL writes:
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
So this condition only applies if your work is "based on" the library, which the licence defines as follows:
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
That is, your program is "based on" the library if and only if it is a derivative work according to copyright law. The legal definition of that term varies somewhat among jurisdictions, and usually does not directly address software. For instance, the US Copyright Act writes:
A “derivative work” is a work based upon one or more preexisting works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which a work may be recast, transformed, or adapted. A work consisting of editorial revisions, annotations, elaborations, or other modifications which, as a whole, represent an original work of authorship, is a “derivative work”.
What this means for software must be interpreted by the courts, based on earlier similar rulings. I am not sufficiently familiar with the relevant case law in your jurisdiction to say with certainty how a court would decide your case. One could argue that "replacing the GPL library with own code" is an act of translation, particularly if your code is strongly inspired by the GPL implementation. Even reusing the API of the GPL library could land you in hot water (see Oracle vs. Google).
If the answer matters to you, I recommend seeking competent legal advice rather than asking strangers on the internet.
Best Answer
As a pro,
If your company's office burns down, the code is still on the server.
If your company's office doesn't burn down, but the server on which your git repository is located DOES, then you still have a local copy.
If you host your repository on your server in your company's office building (like you would with a Network shared drive...?), then if the company's office burns down, you lose both.
Of course, you still need backups as usual...
Feel free to replace "burns down" with "gets infected with ransomware".
Basically, availability is up.
As a con,
You'd have to share your files with the 3rd party that will host your code. If you've got really big company secrets, this might not be allowed. For instance, if you have a database containing personal info from european citizens, you might not be allowed to host your code on a third party from the USA - because they'd be subject to US law and thus couldn't be relied upon to uphold EU privacy laws. Even if it is not a legal issue, you should be aware that the third party could be bribed into giving your private files away. This would likely be really bad for the third party (huge reputation penalty), but it could happen.
Basically, confidentiality is down.
If you are okay with trading confidentiality for availability, then hosting your private code online with a third party is a good idea. Otherwise, don't. You could explain the trade-offs to allow your boss to make an intelligent decision - but you might hear "no". That's what can happen if you give someone a decision. If your boss says no, then that's that. I don't think forcibly convincing your boss is a very good idea.