How to join two fixed male pipes
You want something like a pipe Union. You might have to check with local codes though cause  you might need have the union at the appliance with gas lines. I am not 100% sure, a plumber would know. https://www.discounthydraulichose.com/product_p/65-union.htm