Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git with development and production environment

Tags:

git

I am new to git and looking for the most efficient way to setup development and production environment with git.

I develop locally on some projects, say:

project1.local
project2.local
project3.local

When I am ready I push the changes to the server, where beta tester can work with it:

beta.project1.com
beta.project2.com
beta.project3.com

Only if betatest succeeds I would like to push the changes to production domain:

www.project1.com
www.project2.com
www.project3.com

I do understand how to connect project1.local and beta.project1.com. However, I do not really understand how to setup the connection between beta.project1.com and www.project1.com to push tested features into production.

Is git right for me?

like image 260
Linda Avatar asked Oct 15 '12 09:10

Linda


People also ask

What is a git environment?

The environment of any tool consists of elements that support execution with software, hardware, and network configured. It includes operating system settings, hardware configuration, software configuration, test terminals, and other support to perform the operations.

What is the main purpose of git?

Git is a DevOps tool used for source code management. It is a free and open-source version control system used to handle small to very large projects efficiently. Git is used to tracking changes in the source code, enabling multiple developers to work together on non-linear development.

What is git in QA?

Git is a version control system, a tool that tracks changes to your code and shares those changes with others. Git is most useful when combined with GitHub, a website that allows you to share your code with the world, solicit improvements via pull requests and track issues.


1 Answers

Check "A successful Git branching model" to do more or less what you want.

In git you can have multiples repositories (git remote --help). So, in production you can have the repositories pointing to beta, and pull the changes from there. In beta, you can have both, production and development and pull changes from development and push them to production. For each case, you should handle branches, in whose case, the link given should give you enough ideas.

like image 105
gpoo Avatar answered Oct 04 '22 11:10

gpoo