Answer the question
In order to leave comments, you need to log in
Working with branches in GIT?
Good day!
Please advise how to deal with the following. branch situation.
The site is currently being redesigned. Therefore, of course, for the gradual fastening of the new layout on the site, another branch was created. In this case, new_styles .
To test the new design, it was decided to roll out a new version of the site to a new domain.
That is, in fact, 2 sites will use one repository.
I need the old version of the site to use the master branch and the new version to use the new_styles branch .
How can this be implemented? How exactly to upload a new branch new_stylesremotely? And gradually merge from the repository the changes that will be made specifically for this branch?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
in the terminal go to the root directory of the 2nd domain
git init
git remote add origin адрес_репозитория
git checkout new_styles
<?php
$dir = 'директория';
exec("cd $dir && git pull 2>&1", $output);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question