@Sinnbeck oh my apologies, my case is not in the test but on laravel app in general, just a regular dd(env(APP_NAME)) in routes. My expectation is i can switch between each working environment (such as development, or testing, or production) in git branch with still pushing my .env to git so i still can keep track of every .env changes.
Thankfully I have find a way to do that with creating a multiple .env file like this:
\.env
\.env.development
\.env.testing
\.env.production
This way I can keep track changes and specify which .env file should every server use while all branch is having the same version of all .env file (1:1). So I just push every .env file to git to keep track of them, and then set the environment in my web server by adding this in my virtual hosts (nginx):
fastcgi_param APP_ENV development
and so for every server without replacing my .env file on branch merging
Thankyou for your help @sinnbeck . And I hope other people can use this as a references.