I started my first job as a dev about 3 months ago, at a very small company where I'm (currently) the only developer, and I've been setting them up with git. Their codebase is a bit all over the place, but mainly split up into three different sections.
1.) In the root directory of a web server, located on a Windows server, that I have direct access to.
2.) In a separate directory on the same Windows server, outside of the web server's root directory.
3.) Hosted server that we access via FTP.
I've set up git for the first two sections in the same way - I have a bare repo initialized parallel to the live code, with a post-receive hook that deploys to the production directories. My personal "local" repo is also parallel to the production directories, with the same name, just with my name in front of it.
So for example, it would look like this:
production_folder/ production_folder.git/ <my_name>_production_folder/
This has been working alright, but the more I use it the more it doesn't exactly seem ideal. For starters, I have to keep a close eye on the path names, because the ones in my "local" repo of course reference
<my_name>_production_folder and the ones in production need to reference
So my question is, is this method generally ill-advised? And if so, would it be better to have my local repo on a totally different drive altogether somewhere, so that all the file names and file paths would be identical? Are there other reasons to/to not do it this way?
I know how to use the basics of git already, and the things I find when searching for an answer about this are more along the lines of "learn how to use this particular part of git" rather than best practices for repo placement. this question was similar, but concerns putting development repos within the production code directory, which I'm not trying to do. I also went through the questions links that the answerer posted and didn't quite find what I'm looking for.
Thanks in advance, and any guidance/advice/resources are greatly appreciated!