I had a basic question regarding using a git repository in different environments. I'm more of a Sys admin than a web developer, so the teams I've worked on before just worked right in the master, which obviously isn't the right way to do it.
I'm setting up a dev/prod/stage environment for a small company, and the Git repo has master/stage/dev branches. Locally, I just clone the git repo, then
git checkout development, which works fine, but I was wondering what the best way to do that in the dev/stage/prod servers would be?
To me, it seems like checking out the entire repository in the environments, then just
get checkout <environment> might not be the right way to do it, since the prod only needs the production branch, dev only needs development, etc.