-1

We are a web-based software company who currently has 2 developers and no version control system. We have decided to start using GIT and are looking for advice on implantation. We have a fairly complex setup making it difficult.

Let me outline the situation:

  • We have two developers who will need to work on the same files as the same time (Will expand to more developers in the future)
  • Our multi-server setup on AWS makes it extremely difficult/impossible to set up local environments for testing. Therefore, our personal "sandbox" will not be on our local machines but on our servers.
  • Our app is built off 7 directories inside a root and each directory has it's own sub-domain (we have a CDN on one, sub-apps on others, and they all work together to form our marketed application)
  • We need to be able to build and test code and merge into a "Development" environment that we can stage and test and once approved push to production. Obviously using GIT to track changes.

We are new to GIT and would like some advice or recommendations for setting this up. Again, looking for high-level recommendations such as "Build this repo/branch/directory" not any specific code samples at this point unless super relevant.

How would you structure this GIT environment considering these limitations, specifically developers not being able to use localhost for testing?

DigitalMC
  • 805
  • 2
  • 16
  • 31

2 Answers2

1

Without knowing exact details I can only suggest a general idea, but I guess that is what you want anyway.

If you are new to git, you should google "git workflow examples". There are lots of good ones out there.

This is a good place to get started: https://www.atlassian.com/git/tutorials/comparing-workflows/

Im not sure if I completely understand your situation in terms of testing, but if you each require your own testing branches, you could setup build servers for branches like person1-sandbox and person2-sandbox where you can each test separately, and then merge into a develop branch. From develop you can test again and then push to production.

Hopefully this helps. If you have questions, please comment and I can try to give you a hand.

tehp
  • 5,018
  • 1
  • 24
  • 31
  • That link was very helpful! Also you suggest using branches which is interesting. I kinda thought branches were just for product versions and didn't know if they could be used to delineate DEV environments. So in this world you would have the Master branch, Development branch (child of master), and two developer branches (children of Development). Also can I have 1 Repo for all 7 directories (again these all have their own sub-domain) or do I need a Repo for each directory? – DigitalMC Dec 05 '16 at 14:21
  • Exactly right. Your 7 directories (branches) will all be in one repository. – tehp Dec 05 '16 at 14:44
  • I was thinking all 7 directories would be 1 branch. Master (7 directories), Development (7 directories), and each developer branch (7 directories). To give clarity these directories represent facets of the main app... for example: Dir 1 = "Assets", Dir 2 = "Website Stuff", Dir 3 = "Email Stuff", Dir 4 = "Subscriber Stuff" and so on. They all have their own sub-domain (asssets.app.com, email.app.com, web.app.com) but to the end-user all visually appear in app.com using iframes. Would I need a branch for each of these or could I consolidate? Keep in mind the ASSETS directory is on a CDN. – DigitalMC Dec 05 '16 at 15:35
1

Yes, your team can use git to do version control. For your situation:

  1. Git makes it possible to work on the same file by your team members and without size of limitation
  2. Yes, as your develop environment, it’s not necessary to put personal “sandbox” on local machines, you can put it on server as you wish by referring get git on server
  3. 7 directories with no problems for you to use git. If all the sub-apps need to work together, so need to do version control as a whole (in the same branch). And if you update one of a sub-app, the whole project will have a new reversion
  4. Using git will not affect projects’ build and testing
Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • So to be clear using 1 Repo for all 7 directories will work? This is preferred, All 7 of these directories are used in the main APP and each directory has a sub-domain which just serves a different part of the app. This multi-directory portion of the integration is one where I get confused. I'm not sure how many Repos I need considering these directories coupled with the development environment and the 2 developers. Not sure if each environment needs its own repo. – DigitalMC Dec 05 '16 at 14:24
  • 1
    Yes, 1 repo can work for 7 directories. You only need one repo to manage all your apps, because they are related. You can make different environments work on different branches. http://nvie.com/posts/a-successful-git-branching-model/ this is a typical branch model, so you can refer to make your environment, such as dev, stage, QA, production etc on different branches. – Marina Liu Dec 06 '16 at 01:44
  • Great that is very helpful, thanks for the link and all your information. – DigitalMC Dec 06 '16 at 22:04