I was tasked with setting up Git for my office. We have several sites. I just set up a network drive for us to push our changes to. My question is: Where do I init the Git repository?
I seek advice from any and all, especially if you've cursed out the first guy to set it up asking "WHY"?
You shouldn't store credentials like usernames, passwords, API keys and API secrets. If someone else steals your credentials, they can do nasty things with it.
Using submodules One way out of the problem of large files is to use submodules, which enable you to manage one Git repository within another. You can create a submodule, which contains all your binary files, keeping the rest of the code separately in the parent repository, and update the submodule only when necessary.
The structure of repos is not a matter if sites (whatever you want to tell with that) but a matter of projects.
As a rule of thumb:
Within each repo, structure the work with branches, and do not confuse branches with means of organizing different software stacks: branches are used to organize the work in one repo (i.e. different development strings of ONE software). One branching model (that seems to be quite popular here at SO) is this one:
Confused? Curious? Read the explanation...
It's a matter of preference if you'd rather have all code bases in one git repo, or each in their own. That said, my preference would be one git repo per code base/site. That way you can work on a single site without having to check out the others, and you won't have to worry about changes to the other sites getting in the way of any commits you might push to any given site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With