Reputation: 2229
What are some ways to leverage version control to maintain testing, staging, and development code bases? I'm a single developer, so I am looking for something simple. I think an ideal work flow would look something like this, but I'm not sure on how to achieve it.
Have 3 directories, each one contains the respective repository. So something like this:
.../project/
|--- /project-testing/
|--- /project-staging/
|--- /project-production/
Flow: testing -> staging -> production
Testing: contains GitHub remote. Testing is done locally or optionally on test server remote.
Staging: contains staging server remote. Pull changes from testing before pushing to staging server.
Production: contains production server remote. After staging server code is verified, pull code from staging server and push to production remote.
Are there any flaws in this work flow? Are there better options - or is this how it is typically done?
Upvotes: 1
Views: 1120
Reputation: 1188
I think gitflow is exactly what you need. It manages different purposes with different branches (but not directories). This nvie's article is worth to take you ten minutes to read before using it.
Upvotes: 2