简体   繁体   中英

proper git workflow on our 2 dev setup

We have a repository and it only has one branch: master .

My friend and I git clone on master in our local machines. Whenever we have changes we git commit & git push on master and git pull for update.

Now, we bought a VPS to serve as our staging (and will be production later on) and we also setup a subdomain on our domain:

http://dev.domain.com/ => /var/www/project_dev

http://domain.com/ => /var/www/project_prod

Now I am confused what should I do to have a git copy on both directories. Should I create a development branch and we push our local changes there and that is where /var/www/project_dev will clone? Then the master branch is where I should clone the /var/www/project_prod ? Can you please enlighten me.

I like using this workflow .

Git分支模型

Basically, you normally commit to develop branch. Merges into master indicate stable releases . So whenever you merge into master, have a hook pulling from the master branch on the staging repo to the master branch on the production repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM